]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: bcm: Remove null dereference from InterfaceWRM.
authorKevin McKinney <klmckinney1@gmail.com>
Sat, 13 Oct 2012 03:49:38 +0000 (23:49 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Oct 2012 20:42:24 +0000 (13:42 -0700)
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>
drivers/staging/bcm/InterfaceMisc.c

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