diff options
author | Joe Handzik <joseph.t.handzik@hp.com> | 2014-03-26 17:48:11 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-05-19 19:12:27 +0200 |
commit | 3b51a7a3910fd5d4165600a64000a9ecf65835f7 (patch) | |
tree | 0d762042bd07818cf10b7cb8d5b02f14ba12e6a7 /drivers/scsi/hpsa.c | |
parent | b42939aa075cc45ceb16c18f3b91a36bacbe7813 (diff) |
hpsa: Checking for a NULL return from a kzalloc call
Checking for a NULL return from a kzalloc call in hpsa_get_pdisk_of_ioaccel2.
Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Joe Handzik <joseph.t.handzik@hp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r-- | drivers/scsi/hpsa.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 9a6e4a2cd072..68254817c3be 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -2836,6 +2836,8 @@ static int hpsa_get_pdisk_of_ioaccel2(struct ctlr_info *h, /* Get the list of physical devices */ physicals = kzalloc(reportsize, GFP_KERNEL); + if (physicals == NULL) + return 0; if (hpsa_scsi_do_report_phys_luns(h, (struct ReportLUNdata *) physicals, reportsize, extended)) { dev_err(&h->pdev->dev, |