brcm80211: fix missing allocation failure check
Check for oobirq_entry allocation failure to avoid NULL pointer dereferencing. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
74673db99c
commit
4abd044af9
@ -638,6 +638,8 @@ static int brcmf_sdio_pd_probe(struct platform_device *pdev)
|
||||
|
||||
oobirq_entry = kzalloc(sizeof(struct brcmf_sdio_oobirq),
|
||||
GFP_KERNEL);
|
||||
if (!oobirq_entry)
|
||||
return -ENOMEM;
|
||||
oobirq_entry->irq = res->start;
|
||||
oobirq_entry->flags = res->flags & IRQF_TRIGGER_MASK;
|
||||
list_add_tail(&oobirq_entry->list, &oobirq_lh);
|
||||
|
Loading…
Reference in New Issue
Block a user