提交 3b51a7a3 编写于 作者: J Joe Handzik 提交者: Christoph Hellwig

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: NScott Teel <scott.teel@hp.com>
Signed-off-by: NJoe Handzik <joseph.t.handzik@hp.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
上级 b42939aa
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册