[OPW,kernel,v3,26/28] staging: rtl8723au: os_dep: usb_ops_linux.c: Replace non-standard return values
diff mbox

Message ID 1414668396-4093-27-git-send-email-roberta.dobrescu@gmail.com
State New, archived
Headers show

Commit Message

Roberta Dobrescu Oct. 30, 2014, 11:26 a.m. UTC
This patch replaces non-standard return values _SUCCESS/_FAIL with 0
or an appropriate err code and modifies the code according to that.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
---
 drivers/staging/rtl8723au/os_dep/usb_ops_linux.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Patch
diff mbox

diff --git a/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c b/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c
index 3e19b3b..b7f547b 100644
--- a/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c
+++ b/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c
@@ -130,7 +130,7 @@  int rtl8723au_write_port(struct rtw_adapter *padapter, u32 addr, u32 cnt,
 	unsigned long irqL;
 	unsigned int pipe, ep_num;
 	int status;
-	int ret = _FAIL;
+	int ret;
 
 	RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("+usb_write_port23a\n"));
 
@@ -139,6 +139,7 @@  int rtl8723au_write_port(struct rtw_adapter *padapter, u32 addr, u32 cnt,
 			 ("%s:(padapter->bDriverStopped || "
 			  "padapter->bSurpriseRemoved)!!!\n", __func__));
 		rtw23a_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_TX_DENY);
+		ret = -EINVAL;
 		goto exit;
 	}
 
@@ -200,11 +201,11 @@  int rtl8723au_write_port(struct rtw_adapter *padapter, u32 addr, u32 cnt,
 		}
 		goto exit;
 	}
-	ret = _SUCCESS;
+	ret = 0;
 	RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("-usb_write_port23a\n"));
 
 exit:
-	if (ret != _SUCCESS)
+	if (ret != 0)
 		rtw_free_xmitbuf23a(pxmitpriv, pxmitbuf);
 
 	return ret;