linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] brcm80211: fix missing allocation failure check
@ 2012-09-10  9:05 Colin King
  2012-09-10 12:29 ` Arend van Spriel
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2012-09-10  9:05 UTC (permalink / raw)
  To: Franky (Zhenhui) Lin, Arend van Spriel, John W. Linville,
	linux-wireless

From: Colin Ian King <colin.king@canonical.com>

Check for oobirq_entry allocation failure to avoid
NULL pointer dereferencing.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
index 49765d3..7c4ee72 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
@@ -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);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] brcm80211: fix missing allocation failure check
  2012-09-10  9:05 [PATCH] brcm80211: fix missing allocation failure check Colin King
@ 2012-09-10 12:29 ` Arend van Spriel
  0 siblings, 0 replies; 2+ messages in thread
From: Arend van Spriel @ 2012-09-10 12:29 UTC (permalink / raw)
  To: Colin King; +Cc: Franky (Zhenhui) Lin, John W. Linville, linux-wireless

On 09/10/2012 11:05 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Check for oobirq_entry allocation failure to avoid
> NULL pointer dereferencing.

Acked-by: Arend van Spriel <arend@broadcom.com>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c |    2 ++
>   1 file changed, 2 insertions(+)

Thanks.

Gr. AvS



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-10 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-10  9:05 [PATCH] brcm80211: fix missing allocation failure check Colin King
2012-09-10 12:29 ` Arend van Spriel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).