Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 1e46731efd9c ("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>

authored by

Gustavo A. R. Silva and committed by
Martin K. Petersen
12de280b 3f7e62bb

+1 -1
+1 -1
drivers/scsi/smartpqi/smartpqi_init.c
··· 323 323 static inline bool pqi_device_in_remove(struct pqi_ctrl_info *ctrl_info, 324 324 struct pqi_scsi_dev *device) 325 325 { 326 - return device->in_remove & !ctrl_info->in_shutdown; 326 + return device->in_remove && !ctrl_info->in_shutdown; 327 327 } 328 328 329 329 static inline void pqi_schedule_rescan_worker_with_delay(