Staging: bcm: Remove null dereference from InterfaceRDM.
authorKevin McKinney <klmckinney1@gmail.com>
Sat, 13 Oct 2012 03:49:37 +0000 (23:49 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Oct 2012 20:42:23 +0000 (13:42 -0700)
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>
drivers/staging/bcm/InterfaceMisc.c

index a101f8f937640134004a4a6ccf973e30f5134963..179bcc2126a0d7fc826726710dbae0d0c03de816 100644 (file)
@@ -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");