From 35e01667c84b1e16060020c3a13099447e61c822 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 28 Apr 2022 12:38:25 +0300 Subject: [PATCH] cxl/mbox: fix logical vs bitwise typo This should be bitwise & instead of &&. Fixes: 6179045ccc0c ("cxl/mbox: Block immediate mode in SET_PARTITION_INFO command") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YmpgkbbQ1Yxu36uO@kili Signed-off-by: Dan Williams --- drivers/cxl/core/mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c index 731cb43..54f4347 100644 --- a/drivers/cxl/core/mbox.c +++ b/drivers/cxl/core/mbox.c @@ -243,7 +243,7 @@ static bool cxl_payload_from_user_allowed(u16 opcode, void *payload_in) case CXL_MBOX_OP_SET_PARTITION_INFO: { struct cxl_mbox_set_partition_info *pi = payload_in; - if (pi->flags && CXL_SET_PARTITION_IMMEDIATE_FLAG) + if (pi->flags & CXL_SET_PARTITION_IMMEDIATE_FLAG) return false; break; } -- 2.7.4