Skip to content

Commit

Permalink
Staging: bcm: Remove null dereference from InterfaceRDM.
Browse files Browse the repository at this point in the history
This patch removes a potential null dereference
from InterfaceMisc.c, function InterfaceRDM. This
error was reported by Smatch.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Kevin McKinney authored and Greg Kroah-Hartman committed Oct 19, 2012
1 parent 1e2731e commit 68f7457
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/bcm/InterfaceMisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ int InterfaceRDM(PS_INTERFACE_ADAPTER psIntfAdapter,
{
int bytes;

if (!psIntfAdapter) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0, "Interface Adapter is NULL");
if (!psIntfAdapter)
return -EINVAL;
}

if (psIntfAdapter->psAdapter->device_removed == TRUE) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0, "Device got removed");
Expand Down

0 comments on commit 68f7457

Please sign in to comment.