]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: sb105x: Remove redundant null check
authorRashika Kheria <rashika.kheria@gmail.com>
Sat, 19 Oct 2013 17:35:01 +0000 (23:05 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 Oct 2013 21:53:45 +0000 (14:53 -0700)
This patch fixes the following Sparse information in sb_pci_mp.c-

~/git/kernels/linux/drivers/staging/sb105x/sb_pci_mp.c:1813
mp_unregister_driver() info: redundant null check on drv->state calling kfree()

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sb105x/sb_pci_mp.c

index 23db32f07fd533ac4803b9a0a56815a5a7606eea..adb6bea728b2cead75af2ecec5997d4e3c011cf5 100644 (file)
@@ -1808,10 +1808,7 @@ void mp_unregister_driver(struct uart_driver *drv)
     drv->tty_driver = NULL;
 
 
-    if (drv->state)
-    {
-        kfree(drv->state);
-    }
+    kfree(drv->state);
 
 }