diff options
author | Joe Handzik <joseph.t.handzik@hp.com> | 2014-03-26 18:48:11 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-05-19 13:12:27 -0400 |
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, | |||
2836 | 2836 | ||
2837 | /* Get the list of physical devices */ | 2837 | /* Get the list of physical devices */ |
2838 | physicals = kzalloc(reportsize, GFP_KERNEL); | 2838 | physicals = kzalloc(reportsize, GFP_KERNEL); |
2839 | if (physicals == NULL) | ||
2840 | return 0; | ||
2839 | if (hpsa_scsi_do_report_phys_luns(h, (struct ReportLUNdata *) physicals, | 2841 | if (hpsa_scsi_do_report_phys_luns(h, (struct ReportLUNdata *) physicals, |
2840 | reportsize, extended)) { | 2842 | reportsize, extended)) { |
2841 | dev_err(&h->pdev->dev, | 2843 | dev_err(&h->pdev->dev, |