hpsa: Checking for a NULL return from a kzalloc call
authorJoe Handzik <joseph.t.handzik@hp.com>
Wed, 26 Mar 2014 22:48:11 +0000 (17:48 -0500)
committerChristoph Hellwig <hch@lst.de>
Mon, 19 May 2014 17:12:27 +0000 (19:12 +0200)
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>
drivers/scsi/hpsa.c

index 9a6e4a2cd072421df1980edfa4c8f914398b3991..68254817c3be839d11252174fac0b7201472a97b 100644 (file)
@@ -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,
This page took 0.026686 seconds and 5 git commands to generate.