public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Michael Straube <straube.linux@gmail.com>, gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: remove return from void function
Date: Mon, 16 Jun 2025 12:52:02 +0200	[thread overview]
Message-ID: <33493c2a-c499-4191-a1a5-3194ce2d76e6@redhat.com> (raw)
In-Reply-To: <20250615123758.41869-1-straube.linux@gmail.com>

Hi,

On 15-Jun-25 14:37, Michael Straube wrote:
> 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>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hansg@kernel.org>

Regards,

Hans


> ---
>  drivers/staging/rtl8723bs/os_dep/os_intfs.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> index 0248dff8f2aa..3cbfc305ede3 100644
> --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> @@ -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)


      reply	other threads:[~2025-06-16 10:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-15 12:37 [PATCH] staging: rtl8723bs: remove return from void function Michael Straube
2025-06-16 10:52 ` Hans de Goede [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=33493c2a-c499-4191-a1a5-3194ce2d76e6@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=straube.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox