summaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm
diff options
context:
space:
mode:
authorKevin McKinney <klmckinney1@gmail.com>2012-10-12 23:49:38 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-19 13:42:24 -0700
commit2807dbe1ce231a077460c05f4badf165d6e08a03 (patch)
tree3e04cc69e57216653f8c2459428bd796049a5fcc /drivers/staging/bcm
parent68f7457d064f4c1972b0a58900a5dabcfd6bbb2e (diff)
downloadop-kernel-dev-2807dbe1ce231a077460c05f4badf165d6e08a03.zip
op-kernel-dev-2807dbe1ce231a077460c05f4badf165d6e08a03.tar.gz
Staging: bcm: Remove null dereference from InterfaceWRM.
This patch removes a potential null dereference from InterfaceMisc.c, function InterfaceWRM. 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')
-rw-r--r--drivers/staging/bcm/InterfaceMisc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/bcm/InterfaceMisc.c b/drivers/staging/bcm/InterfaceMisc.c
index 179bcc2..9c832b3 100644
--- a/drivers/staging/bcm/InterfaceMisc.c
+++ b/drivers/staging/bcm/InterfaceMisc.c
@@ -55,10 +55,8 @@ int InterfaceWRM(PS_INTERFACE_ADAPTER psIntfAdapter,
{
int retval = 0;
- 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");
OpenPOWER on IntegriCloud