[PATCH 4/8] staging: wilc1000: fix return error code of wilc_deinit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It should be returned error code as -EFAULT instead of 0 when hif_drv is
NULL.

Signed-off-by: Chaehyun Lim <chaehyun.lim@xxxxxxxxx>
---
 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 36eeeb4..6c91071 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3890,7 +3890,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.7.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux