]> git.baikalelectronics.ru Git - kernel.git/commit
brcm80211: smac: eliminate a null pointer dereference in dma.c
authorArend van Spriel <arend@broadcom.com>
Sat, 29 Oct 2011 09:30:15 +0000 (11:30 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Nov 2011 18:19:13 +0000 (13:19 -0500)
commit5e963dd038dcbb541ba54f7a12e9eb87230cbde9
treeb34000a231b79a8012cc51ba9d385a6c6621bf4c
parentf0e9f66db34d091165f1d52895bae493eee93e8b
brcm80211: smac: eliminate a null pointer dereference in dma.c

Though it's unlikely, di may be null, so we can't dereference
di->dma.dmactrlflags until we've checked it.

Move this de-reference after the check, and adjust the error
message to not require de-referencing di.

This is based upon Julia's original patch:
<1319846297-2985-2-git-send-email-julia@diku.dk>

Reported-by: Julia Lawall <julia@diku.dk>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmsmac/dma.c