[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210418173233.GA59153@user>
Date: Sun, 18 Apr 2021 23:02:33 +0530
From: Saurav Girepunje <saurav.girepunje@...il.com>
To: gregkh@...uxfoundation.org, fabioaiuto83@...il.com,
hello@...anbrattlof.com, hdegoede@...hat.com,
saurav.girepunje@...gle.com, john.oldman@...ehill.co.uk,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Cc: saurav.girepunje@...mail.com
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@...gle.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
Powered by blists - more mailing lists