Commit 55cec505 authored by Seth Forshee's avatar Seth Forshee Committed by John W. Linville

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: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 69797838
...@@ -349,10 +349,8 @@ static uint _dma_ctrlflags(struct dma_info *di, uint mask, uint flags) ...@@ -349,10 +349,8 @@ static uint _dma_ctrlflags(struct dma_info *di, uint mask, uint flags)
{ {
uint dmactrlflags; uint dmactrlflags;
if (di == NULL) { if (di == NULL)
brcms_dbg_dma(di->core, "NULL dma handle\n");
return 0; return 0;
}
dmactrlflags = di->dma.dmactrlflags; dmactrlflags = di->dma.dmactrlflags;
dmactrlflags &= ~mask; dmactrlflags &= ~mask;
......
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