summaryrefslogtreecommitdiffstats
path: root/drivers/staging/r8188eu
diff options
context:
space:
mode:
authorMichael Straube <straube.linux@gmail.com>2022-09-08 15:09:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-09 09:53:01 +0200
commit3827974ecae1008417451a371cfbd7faa040ca4b (patch)
tree8d51b7f2385cc5a40cccbe7cb4b0e881e2f8e626 /drivers/staging/r8188eu
parent4cf393aeaf5f130ed84957f23cf8edbb21ab0392 (diff)
downloadlinux-3827974ecae1008417451a371cfbd7faa040ca4b.tar.bz2
staging: r8188eu: remove unnecessary return labels.
Remove the RETURN labels in rtw_alloc_etherdev_with_old_priv() and rtw_alloc_etherdev() and return directly to clean up the code and improve readability. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220908130915.8406-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu')
-rw-r--r--drivers/staging/r8188eu/os_dep/osdep_service.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
index 3504a0a9ba87..875a41650896 100644
--- a/drivers/staging/r8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
@@ -54,14 +54,13 @@ struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv,
pnetdev = alloc_etherdev_mq(sizeof(struct rtw_netdev_priv_indicator), 4);
if (!pnetdev)
- goto RETURN;
+ return NULL;
pnetdev->dev.type = &wlan_type;
pnpi = netdev_priv(pnetdev);
pnpi->priv = old_priv;
pnpi->sizeof_priv = sizeof_priv;
-RETURN:
return pnetdev;
}
@@ -72,19 +71,18 @@ struct net_device *rtw_alloc_etherdev(int sizeof_priv)
pnetdev = alloc_etherdev_mq(sizeof(struct rtw_netdev_priv_indicator), 4);
if (!pnetdev)
- goto RETURN;
+ return NULL;
pnpi = netdev_priv(pnetdev);
pnpi->priv = vzalloc(sizeof_priv);
if (!pnpi->priv) {
free_netdev(pnetdev);
- pnetdev = NULL;
- goto RETURN;
+ return NULL;
}
pnpi->sizeof_priv = sizeof_priv;
-RETURN:
+
return pnetdev;
}