staging: rtl8723bs: remove unnecessary goto jumps
Subsystems (2)
PATCH v2 1/1 staging: rtl8723bs: remove unnecessary goto jumps
The next instruction for both 'goto exit' jump statements is to execute the exit jump instructions regardless. We can safely remove all jump statements from __init rtw_drv_entry()
---
Changes from:
v1: removed unnecessary edit of DBG_871X_LEVEL
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +0 -5
@@ -517,12 +517,8 @@ static int __init rtw_drv_entry(void)if (ret !=0 ) { sdio_drvpriv.drv_registered = false;rtw_ndev_notifier_unregister (); - goto exit; } - goto exit; - -exit:DBG_871X_LEVEL (_drv_always_,"module init ret =%d\n" , ret);return ret; }
@@ -540,6 +536,5 @@ static void __exit rtw_drv_halt(void)DBG_871X_LEVEL (_drv_always_,"module exit success\n" ); } -module_init (rtw_drv_entry);module_exit (rtw_drv_halt);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerQuoted 30 lines · Bryan Brattlof
The next instruction for both 'goto exit' jump statements is to execute the exit jump instructions regardless. We can safely remove all jump statements from
__initrtw_drv_entry()Signed-off-by Bryan Brattlof <[email protected]>---
Changes from:
v1: removed unnecessary edit ofDBG_871X_LEVELdrivers/staging/rtl8723bs/os_dep/sdio_intf.c | 5 ----- 1 file changed, 5 deletions(-)drivers/staging/rtl8723bs/os_dep/sdio_intf.c +0
-4@@ -517,12 +517,8 @@ static int __init rtw_drv_entry(void)if (ret !=0 ) { sdio_drvpriv.drv_registered = false;rtw_ndev_notifier_unregister (); - goto exit; } - goto exit; - -exit:DBG_871X_LEVEL (_drv_always_,"module init ret =%d\n" , ret);return ret; }
drivers/staging/rtl8723bs/os_dep/sdio_intf.c static void __exit rtw_drv_halt(void) · line 540
Quoted 6 lines
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +0
-1@@ -540,6 +536,5 @@ static void __exit rtw_drv_halt(void)DBG_871X_LEVEL (_drv_always_,"module exit success\n" ); } -module_init (rtw_drv_entry);module_exit (rtw_drv_halt);
Any reason you removed this extra line?
thanks,
greg k-h
Quoted 35 lines · Greg Kroah-Hartman
Quoted 33 lines · Bryan Brattlof
The next instruction for both 'goto exit' jump statements is to execute the exit jump instructions regardless. We can safely remove all jump statements from
__initrtw_drv_entry()Signed-off-by Bryan Brattlof <[email protected]>---
Changes from:
v1: removed unnecessary edit ofDBG_871X_LEVELdrivers/staging/rtl8723bs/os_dep/sdio_intf.c | 5 ----- 1 file changed, 5 deletions(-)drivers/staging/rtl8723bs/os_dep/sdio_intf.c +0
-4@@ -517,12 +517,8 @@ static int __init rtw_drv_entry(void)if (ret !=0 ) { sdio_drvpriv.drv_registered = false;rtw_ndev_notifier_unregister (); - goto exit; } - goto exit; - -exit:DBG_871X_LEVEL (_drv_always_,"module init ret =%d\n" , ret);return ret; }@@ -540,6 +536,5 @@ static void __exit rtw_drv_halt(void)DBG_871X_LEVEL (_drv_always_,"module exit success\n" ); }
Quoted 6 lines
drivers/staging/rtl8723bs/os_dep/sdio_intf.c static void __exit rtw_drv_halt(void) · line 540
Quoted 3 lines
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +0
-1-module_init (rtw_drv_entry);module_exit (rtw_drv_halt);Any reason you removed this extra line?
Oops! My bad... again :(
I removed the line to take away one of the many checkpatch.pl messages.
I'll be sending v3 here momentarily with an updated commit message
Quoted 4 lines
thanks,
greg k-h
Sorry for the noise today
--
~Bryan