wifi: rtl8xxxu: (trivial) remove unnecessary return

Message ID 20230427185936.923777-1-martin@kaiser.cx
State New
Headers
Series wifi: rtl8xxxu: (trivial) remove unnecessary return |

Commit Message

Martin Kaiser April 27, 2023, 6:59 p.m. UTC
  Remove a return statement at the end of a void function.

This fixes a checkpatch warning.

WARNING: void function return statements are not generally useful
6206: FILE: ./drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:6206:
+  return;
+}

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Ping-Ke Shih April 28, 2023, 12:22 a.m. UTC | #1
> -----Original Message-----
> From: Martin Kaiser <martin@kaiser.cx>
> Sent: Friday, April 28, 2023 3:00 AM
> To: Jes Sorensen <Jes.Sorensen@gmail.com>; Kalle Valo <kvalo@kernel.org>; David S. Miller
> <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>
> Cc: Martin Kaiser <martin@kaiser.cx>; linux-wireless@vger.kernel.org; netdev@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: [PATCH] wifi: rtl8xxxu: (trivial) remove unnecessary return
> 
> Remove a return statement at the end of a void function.
> 
> This fixes a checkpatch warning.
> 
> WARNING: void function return statements are not generally useful
> 6206: FILE: ./drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:6206:
> +  return;
> +}
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>

Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>

> ---
>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> index fd8c8c6d53d6..7e7bb11231e3 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -6281,7 +6281,6 @@ static void rtl8xxxu_rx_complete(struct urb *urb)
>  cleanup:
>         usb_free_urb(urb);
>         dev_kfree_skb(skb);
> -       return;
>  }
> 
>  static int rtl8xxxu_submit_rx_urb(struct rtl8xxxu_priv *priv,
> --
> 2.30.2
  
Kalle Valo May 5, 2023, 7:34 a.m. UTC | #2
Martin Kaiser <martin@kaiser.cx> wrote:

> Remove a return statement at the end of a void function.
> 
> This fixes a checkpatch warning.
> 
> WARNING: void function return statements are not generally useful
> 6206: FILE: ./drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:6206:
> +  return;
> +}
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>

Patch applied to wireless-next.git, thanks.

271a588d34ed wifi: rtl8xxxu: rtl8xxxu_rx_complete(): remove unnecessary return
  

Patch

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index fd8c8c6d53d6..7e7bb11231e3 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -6281,7 +6281,6 @@  static void rtl8xxxu_rx_complete(struct urb *urb)
 cleanup:
 	usb_free_urb(urb);
 	dev_kfree_skb(skb);
-	return;
 }
 
 static int rtl8xxxu_submit_rx_urb(struct rtl8xxxu_priv *priv,