]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
staging: rtl8723bs: remove return from void function
authorMichael Straube <straube.linux@gmail.com>
Sun, 15 Jun 2025 12:37:58 +0000 (14:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2025 15:32:40 +0000 (17:32 +0200)
Remove exit label and return statement from a void function.
After the exit label no cleanup is done, so it is safe to remove it
and return early in the only place where the label is used.
This simplifies the code and clears a checkpatch warning.

WARNING: void function return statements are not generally useful

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250615123758.41869-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/os_dep/os_intfs.c

index 0248dff8f2aa5724665968839b89035195214917..3cbfc305ede34eade5897e855041f1b5750a283b 100644 (file)
@@ -1112,7 +1112,7 @@ void rtw_suspend_common(struct adapter *padapter)
 
        if ((!padapter->bup) || (padapter->bDriverStopped) || (padapter->bSurpriseRemoved)) {
                pdbgpriv->dbg_suspend_error_cnt++;
-               goto exit;
+               return;
        }
        rtw_ps_deny(padapter, PS_DENY_SUSPEND);
 
@@ -1134,10 +1134,6 @@ void rtw_suspend_common(struct adapter *padapter)
 
        netdev_dbg(padapter->pnetdev, "rtw suspend success in %d ms\n",
                   jiffies_to_msecs(jiffies - start_time));
-
-exit:
-
-       return;
 }
 
 static int rtw_resume_process_normal(struct adapter *padapter)