瀏覽代碼

staging: rtl8723bs: Fix the return value in case of error in 'rtw_wx_read32()'

We return 0 unconditionally in 'rtw_wx_read32()'.
However, 'ret' is set to some error codes in several error handling paths.

Return 'ret' instead to propagate the error code.

Fixes: 554c0a3abf216 ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christophe JAILLET 6 年之前
父節點
當前提交
c3e43d8b95
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/staging/rtl8723bs/os_dep/ioctl_linux.c

+ 1 - 1
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c

@@ -2289,7 +2289,7 @@ static int rtw_wx_read32(struct net_device *dev,
 exit:
 	kfree(ptmp);
 
-	return 0;
+	return ret;
 }
 
 static int rtw_wx_write32(struct net_device *dev,