diff options
author | Joe Handzik <joseph.t.handzik@hp.com> | 2014-05-21 12:16:01 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-05-28 06:25:12 -0400 |
commit | 2bbf5c7f9fe8fea2b2ccf02b9b5d2cbd997f2de1 (patch) | |
tree | 31b49aa049a683b890d84a9608e9126b9766244e | |
parent | 757f5bad2b748dca6f82e660875320d156485ea5 (diff) |
hpsa: fix bad comparison of signed with unsigned in hpsa_update_scsi_devices
rescan_hba_mode was defined as a u8 so could never be less than zero:
rescan_hba_mode = hpsa_hba_mode_enabled(h);
if (rescan_hba_mode < 0)
goto out;
Signed-off-by: Joe Handzik <joseph.t.handzik@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/scsi/hpsa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 13d4cc5685b7..5858600bfe59 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -3020,7 +3020,7 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h, int hostno) | |||
3020 | int reportlunsize = sizeof(*physdev_list) + HPSA_MAX_PHYS_LUN * 24; | 3020 | int reportlunsize = sizeof(*physdev_list) + HPSA_MAX_PHYS_LUN * 24; |
3021 | int i, n_ext_target_devs, ndevs_to_allocate; | 3021 | int i, n_ext_target_devs, ndevs_to_allocate; |
3022 | int raid_ctlr_position; | 3022 | int raid_ctlr_position; |
3023 | u8 rescan_hba_mode; | 3023 | int rescan_hba_mode; |
3024 | DECLARE_BITMAP(lunzerobits, MAX_EXT_TARGETS); | 3024 | DECLARE_BITMAP(lunzerobits, MAX_EXT_TARGETS); |
3025 | 3025 | ||
3026 | currentsd = kzalloc(sizeof(*currentsd) * HPSA_MAX_DEVICES, GFP_KERNEL); | 3026 | currentsd = kzalloc(sizeof(*currentsd) * HPSA_MAX_DEVICES, GFP_KERNEL); |