summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-08-17 16:44:44 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-25 04:29:08 +0200
commit55e1f9f0881e29cf4974ee551aa36d2bca7ab1d6 (patch)
treeda893a70d53441130eb8a61aaf9882091bea9f39 /drivers/scsi/hpsa.c
parentscsi: aha1542: constify pnp_device_id (diff)
downloadlinux-55e1f9f0881e29cf4974ee551aa36d2bca7ab1d6.tar.xz
linux-55e1f9f0881e29cf4974ee551aa36d2bca7ab1d6.zip
scsi: hpsa: fix the device_id in hpsa_update_device_info()
The parentheses are in the wrong place so we specify the length as "sizeof(this_device->device_id) < 0" which is zero. Fixes: 988b87edd231 ("scsi: hpsa: Ignore errors for unsupported LV_DEVICE_ID VPD page") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 2773dd7a2087..a22295ee3b70 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3827,7 +3827,7 @@ static int hpsa_update_device_info(struct ctlr_info *h,
memset(this_device->device_id, 0,
sizeof(this_device->device_id));
if (hpsa_get_device_id(h, scsi3addr, this_device->device_id, 8,
- sizeof(this_device->device_id) < 0))
+ sizeof(this_device->device_id)) < 0)
dev_err(&h->pdev->dev,
"hpsa%d: %s: can't get device id for host %d:C0:T%d:L%d\t%s\t%.16s\n",
h->ctlr, __func__,