mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
hpsa: make hpsa_init_one return -ENOMEM if allocation of h->lockup_detected fails
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Reviewed-by: Joe Handzik <joseph.t.handzik@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
3b7f040ac6
commit
2a5ac32653
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue