aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2014-05-29 11:54:20 -0400
committerChristoph Hellwig <hch@lst.de>2014-06-02 03:55:01 -0400
commita84d794d5c12a4c118bcdc4fecc2ca76ed02f643 (patch)
tree3c78bb4366d77e7ae99d7841a77b097aa7aa196a
parent24a4b07879d6d750ef868b94cbdde510d63a1de9 (diff)
hpsa: return -ENOMEM not -1 on kzalloc failure in hpsa_get_device_id
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Mike Miller <michael.miller@canonical.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-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 c5b24e6cadfe..af51e7d4e262 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -2430,7 +2430,7 @@ static int hpsa_get_device_id(struct ctlr_info *h, unsigned char *scsi3addr,
2430 buflen = 16; 2430 buflen = 16;
2431 buf = kzalloc(64, GFP_KERNEL); 2431 buf = kzalloc(64, GFP_KERNEL);
2432 if (!buf) 2432 if (!buf)
2433 return -1; 2433 return -ENOMEM;
2434 rc = hpsa_scsi_do_inquiry(h, scsi3addr, VPD_PAGE | 0x83, buf, 64); 2434 rc = hpsa_scsi_do_inquiry(h, scsi3addr, VPD_PAGE | 0x83, buf, 64);
2435 if (rc == 0) 2435 if (rc == 0)
2436 memcpy(device_id, &buf[8], buflen); 2436 memcpy(device_id, &buf[8], buflen);