Skip to content

Commit

Permalink
brcmsmac: Fix possible NULL pointer dereference in _dma_ctrlflags()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Seth Forshee authored and John W. Linville committed Nov 30, 2012
1 parent 6979783 commit 55cec50
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/wireless/brcm80211/brcmsmac/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,8 @@ static uint _dma_ctrlflags(struct dma_info *di, uint mask, uint flags)
{
uint dmactrlflags;

if (di == NULL) {
brcms_dbg_dma(di->core, "NULL dma handle\n");
if (di == NULL)
return 0;
}

dmactrlflags = di->dma.dmactrlflags;
dmactrlflags &= ~mask;
Expand Down

0 comments on commit 55cec50

Please sign in to comment.