Commit 4abd044a authored by Colin Ian King's avatar Colin Ian King Committed by John W. Linville

brcm80211: fix missing allocation failure check

Check for oobirq_entry allocation failure to avoid
NULL pointer dereferencing.
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 74673db9
...@@ -638,6 +638,8 @@ static int brcmf_sdio_pd_probe(struct platform_device *pdev) ...@@ -638,6 +638,8 @@ static int brcmf_sdio_pd_probe(struct platform_device *pdev)
oobirq_entry = kzalloc(sizeof(struct brcmf_sdio_oobirq), oobirq_entry = kzalloc(sizeof(struct brcmf_sdio_oobirq),
GFP_KERNEL); GFP_KERNEL);
if (!oobirq_entry)
return -ENOMEM;
oobirq_entry->irq = res->start; oobirq_entry->irq = res->start;
oobirq_entry->flags = res->flags & IRQF_TRIGGER_MASK; oobirq_entry->flags = res->flags & IRQF_TRIGGER_MASK;
list_add_tail(&oobirq_entry->list, &oobirq_lh); list_add_tail(&oobirq_entry->list, &oobirq_lh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment