lkml.org 
[lkml]   [2021]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH] staging: rtl8723bs: os_dep: remove multiple return
on sdio_intf.c rtw_sdio_suspend call we have multiple
return which can replace by goto exit. As in all the places
return value is 0.

Signed-off-by: Saurav Girepunje <saurav.girepunje@google.com>
---
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index a9a9631dd23c..3e566cf97f6e 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -445,14 +445,17 @@ static int rtw_sdio_suspend(struct device *dev)
struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;

if (padapter->bDriverStopped)
- return 0;
+ goto exit;

if (pwrpriv->bInSuspend) {
pdbgpriv->dbg_suspend_error_cnt++;
- return 0;
+ goto exit;
}

- return rtw_suspend_common(padapter);
+ rtw_suspend_common(padapter);
+exit:
+
+ return 0;
}

static int rtw_resume_process(struct adapter *padapter)
--
2.25.1
\
 
 \ /
  Last update: 2021-04-18 19:33    [W:0.047 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site