All of lore.kernel.org
 help / color / mirror / Atom feed
From: Haasham Khan <haasham93@gmail.com>
To: sudipm.mukherjee@gmail.com
Cc: teddy.wang@siliconmotion.com, gregkh@linuxfoundation.org,
	linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, Haasham Khan <haasham93@gmail.com>
Subject: [PATCH v2] staging: sm750fb: remove unnecessary goto
Date: Sun, 25 Oct 2026 16:26:32 +0000	[thread overview]
Message-ID: <20261025162632.7186-1-haasham93@gmail.com> (raw)
In-Reply-To: <20261025130258.10747-1-haasham93@gmail.com>

Return directly when setting the mode timing fails, rather than
jumping to a label that only returns ret. Return 0 on the successful
path.

Signed-off-by: Haasham Khan <haasham93@gmail.com>
---

Changes in v2:
- Return 0 on the successful path, as suggested by Dan Carpenter.
 drivers/staging/sm750fb/sm750_hw.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
index c4358d3e5091..4dfa1cb6b352 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,8 +332,7 @@ int hw_sm750_crtc_set_mode(struct lynxfb_crtc *crtc,
 		poke32(CRT_DISPLAY_CTRL, reg);
 	}
 
-exit:
-	return ret;
+	return 0;
 }
 
 int hw_sm750_set_col_reg(struct lynxfb_crtc *crtc, ushort index, ushort red,
-- 
2.53.0


  parent reply	other threads:[~2026-10-25 16:26 UTC|newest]

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

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=20261025162632.7186-1-haasham93@gmail.com \
    --to=haasham93@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.