Skip to content

Commit

Permalink
scsi: smartpqi_init: fix boolean expression in pqi_device_remove_start
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gustavo A. R. Silva authored and Martin K. Petersen committed Jan 9, 2019
1 parent 3f7e62b commit 12de280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/smartpqi/smartpqi_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ static inline void pqi_device_remove_start(struct pqi_scsi_dev *device)
static inline bool pqi_device_in_remove(struct pqi_ctrl_info *ctrl_info,
struct pqi_scsi_dev *device)
{
return device->in_remove & !ctrl_info->in_shutdown;
return device->in_remove && !ctrl_info->in_shutdown;
}

static inline void pqi_schedule_rescan_worker_with_delay(
Expand Down

0 comments on commit 12de280

Please sign in to comment.