fix: partition info get count flags usage

Follow up to change [1] fix statements related to
FFA_PARTITION_COUNT_FLAG_MASK and FFA_PARTITION_COUNT_FLAG
macros usage.

[1] https://review.trustedfirmware.org/c/hafnium/hafnium/+/13033

Change-Id: I2a08ea66fc7de8ad9d6eb9cbeb70c1a087e04289
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/src/api.c b/src/api.c
index ae9bb68..46eb892 100644
--- a/src/api.c
+++ b/src/api.c
@@ -430,7 +430,7 @@
 {
 	struct vm *current_vm = current->vm;
 	ffa_vm_count_t vm_count = 0;
-	bool count_flag = (flags && FFA_PARTITION_COUNT_FLAG_MASK) ==
+	bool count_flag = (flags & FFA_PARTITION_COUNT_FLAG_MASK) ==
 			  FFA_PARTITION_COUNT_FLAG;
 	bool uuid_is_null = ffa_uuid_is_null(uuid);
 	struct ffa_partition_info partitions[2 * MAX_VMS] = {0};
@@ -438,7 +438,7 @@
 	struct ffa_value ret;
 
 	/* Bits 31:1 Must Be Zero */
-	if ((flags & ~FFA_PARTITION_COUNT_FLAG) != 0) {
+	if ((flags & ~FFA_PARTITION_COUNT_FLAG_MASK) != 0) {
 		return ffa_error(FFA_INVALID_PARAMETERS);
 	}