staging: wilc1000: fix return error code of wilc_deinit
authorChaehyun Lim <chaehyun.lim@gmail.com>
Fri, 5 Feb 2016 01:35:14 +0000 (10:35 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 01:34:58 +0000 (17:34 -0800)
It should be returned error code as -EFAULT instead of 0 when hif_drv is
NULL.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index ef7c90ff3af9cf27c33f235cda724fceb747243a..c42286a7bab9a678efde07966f2ef2743299d1cc 100644 (file)
@@ -3695,7 +3695,7 @@ int wilc_deinit(struct wilc_vif *vif)
 
        if (!hif_drv)   {
                PRINT_ER("hif_drv = NULL\n");
-               return 0;
+               return -EFAULT;
        }
 
        down(&hif_sema_deinit);