Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

brcmsmac: Fix possible NULL pointer dereference in _dma_ctrlflags()

There's a debug message to warn if this function is passed a NULL
pointer, but in order to print the message we have to dereference the
pointer. Obviously this isn't a good idea, so remove the message.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Seth Forshee and committed by
John W. Linville
55cec505 69797838

+1 -3
+1 -3
drivers/net/wireless/brcm80211/brcmsmac/dma.c
··· 349 349 { 350 350 uint dmactrlflags; 351 351 352 - if (di == NULL) { 353 - brcms_dbg_dma(di->core, "NULL dma handle\n"); 352 + if (di == NULL) 354 353 return 0; 355 - } 356 354 357 355 dmactrlflags = di->dma.dmactrlflags; 358 356 dmactrlflags &= ~mask;