From 2bbf5c7f9fe8fea2b2ccf02b9b5d2cbd997f2de1 Mon Sep 17 00:00:00 2001 From: Joe Handzik Date: Wed, 21 May 2014 11:16:01 -0500 Subject: [PATCH] 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 Signed-off-by: Stephen M. Cameron Reported-by: Dan Carpenter Signed-off-by: Christoph Hellwig --- drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) int reportlunsize = sizeof(*physdev_list) + HPSA_MAX_PHYS_LUN * 24; int i, n_ext_target_devs, ndevs_to_allocate; int raid_ctlr_position; - u8 rescan_hba_mode; + int rescan_hba_mode; DECLARE_BITMAP(lunzerobits, MAX_EXT_TARGETS); currentsd = kzalloc(sizeof(*currentsd) * HPSA_MAX_DEVICES, GFP_KERNEL); -- 2.39.5