提交 2a5ac326 编写于 作者: S Stephen M. Cameron 提交者: Christoph Hellwig

hpsa: make hpsa_init_one return -ENOMEM if allocation of h->lockup_detected fails

Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com>
Reviewed-by: NJoe Handzik <joseph.t.handzik@hp.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
上级 3b7f040a
......@@ -6995,8 +6995,10 @@ static int hpsa_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
/* Allocate and clear per-cpu variable lockup_detected */
h->lockup_detected = alloc_percpu(u32);
if (!h->lockup_detected)
if (!h->lockup_detected) {
rc = -ENOMEM;
goto clean1;
}
set_lockup_detected_for_all_cpus(h, 0);
rc = hpsa_pci_init(h);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册