From 8eb62f3f6d8e58ec1b0eedee73ddd371a80a1bd3 Mon Sep 17 00:00:00 2001 From: Chaehyun Lim Date: Fri, 5 Feb 2016 10:35:14 +0900 Subject: [PATCH] staging: wilc1000: fix return error code of wilc_deinit It should be returned error code as -EFAULT instead of 0 when hif_drv is NULL. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index ef7c90ff3af9..c42286a7bab9 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -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); -- 2.30.2