mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Haasham Khan <haasham93@gmail.com>
Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
	gregkh@linuxfoundation.org, linux-fbdev@vger.kernel.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: sm750fb: remove unnecessary goto
Date: Sun, 25 Oct 2026 16:58:44 +0300	[thread overview]
Message-ID: <at4LFOUt-XGzBAgS@stanley.mountain> (raw)
In-Reply-To: <20261025130258.10747-1-haasham93@gmail.com>

On Sun, Oct 25, 2026 at 01:02:58PM +0000, Haasham Khan wrote:
> The error path in hw_sm750_crtc_set_mode() jumps to a label that
> immediately returns ret. Return directly and remove the unnecessary
> label.
> 
> Signed-off-by: Haasham Khan <haasham93@gmail.com>
> ---
>  drivers/staging/sm750fb/sm750_hw.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
> index c4358d3e5091..22f93277e91b 100644
> --- a/drivers/staging/sm750fb/sm750_hw.c
> +++ b/drivers/staging/sm750fb/sm750_hw.c
> @@ -272,7 +272,7 @@ int hw_sm750_crtc_set_mode(struct lynxfb_crtc *crtc,
>  	ret = ddk750_set_mode_timing(&modparm, clock);
>  	if (ret) {
>  		dev_err(&sm750_dev->pdev->dev, "Set mode timing failed\n");
> -		goto exit;
> +		return ret;
>  	}
>  
>  	if (crtc->channel != sm750_secondary) {
> @@ -332,7 +332,6 @@ int hw_sm750_crtc_set_mode(struct lynxfb_crtc *crtc,
>  		poke32(CRT_DISPLAY_CTRL, reg);
>  	}
>  
> -exit:
>  	return ret;

Change this to "return 0;"

regards,
dan carpenter


  reply	other threads:[~2026-10-25 13:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 13:02 Haasham Khan
2026-10-25 13:58 ` Dan Carpenter [this message]
2026-10-25 16:26 ` [PATCH v2] " Haasham Khan
2026-10-25 18:19   ` Dan Carpenter
2026-10-25 20:26 [PATCH] " Haasham Khan

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=at4LFOUt-XGzBAgS@stanley.mountain \
    --to=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=haasham93@gmail.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=teddy.wang@siliconmotion.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

all inboxes | Powered by JetHome®