mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: sm750fb: remove unnecessary goto
@ 2026-10-25 13:02 Haasham Khan
  2026-10-25 13:58 ` Dan Carpenter
  2026-10-25 16:26 ` [PATCH v2] " Haasham Khan
  0 siblings, 2 replies; 4+ messages in thread
From: Haasham Khan @ 2026-10-25 13:02 UTC (permalink / raw)
  To: sudipm.mukherjee
  Cc: teddy.wang, gregkh, linux-fbdev, linux-staging, linux-kernel,
	Haasham Khan

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;
 }
 
-- 
2.53.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-25 18:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH v2] " Haasham Khan
2026-10-25 18:19   ` Dan Carpenter

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®