hpsa: fix bad comparison of signed with unsigned in hpsa_update_scsi_devices
authorJoe Handzik <joseph.t.handzik@hp.com>
Wed, 21 May 2014 16:16:01 +0000 (11:16 -0500)
committerChristoph Hellwig <hch@lst.de>
Wed, 28 May 2014 10:25:12 +0000 (12:25 +0200)
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>
drivers/scsi/hpsa.c

index 13d4cc5685b7fc301c2e135daba784b7bfd283a0..5858600bfe593255592dd009fcdb02b82463f04d 100644 (file)
@@ -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);