Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2bbf5c7f authored by Joe Handzik's avatar Joe Handzik Committed by Christoph Hellwig
Browse files

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: default avatarJoe Handzik <joseph.t.handzik@hp.com>
Signed-off-by: default avatarStephen M. Cameron <scameron@beardog.cce.hp.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 757f5bad
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);