Skip to content

Commit 12de280

Browse files
GustavoARSilvamartinkpetersen
authored andcommitted
scsi: smartpqi_init: fix boolean expression in pqi_device_remove_start
Fix boolean expression by using logical AND operator '&&' instead of bitwise operator '&'. This issue was detected with the help of Coccinelle. Fixes: 1e46731 ("scsi: smartpqi: check for null device pointers") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 3f7e62b commit 12de280

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/smartpqi/smartpqi_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ static inline void pqi_device_remove_start(struct pqi_scsi_dev *device)
323323
static inline bool pqi_device_in_remove(struct pqi_ctrl_info *ctrl_info,
324324
struct pqi_scsi_dev *device)
325325
{
326-
return device->in_remove & !ctrl_info->in_shutdown;
326+
return device->in_remove && !ctrl_info->in_shutdown;
327327
}
328328

329329
static inline void pqi_schedule_rescan_worker_with_delay(

0 commit comments

Comments
 (0)