diff options
author | Kevin McKinney <klmckinney1@gmail.com> | 2012-10-12 23:49:37 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-19 13:42:23 -0700 |
commit | 68f7457d064f4c1972b0a58900a5dabcfd6bbb2e (patch) | |
tree | 9d9e659a6da38ceeb90555b5b9945443731eaf80 /drivers/staging/bcm/InterfaceMisc.c | |
parent | 1e2731eb503e7ddb09fe02d955918e466ad1b0a4 (diff) |
Staging: bcm: Remove null dereference from InterfaceRDM.
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>
Diffstat (limited to 'drivers/staging/bcm/InterfaceMisc.c')
-rw-r--r-- | drivers/staging/bcm/InterfaceMisc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/bcm/InterfaceMisc.c b/drivers/staging/bcm/InterfaceMisc.c index a101f8f93764..179bcc2126a0 100644 --- a/drivers/staging/bcm/InterfaceMisc.c +++ b/drivers/staging/bcm/InterfaceMisc.c @@ -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"); |