# \[PATCH\] staging: sm750fb: remove unnecessary goto

- From: Haasham Khan \<hidden\>
- Date: 2026-10-25 20:27:06 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2026/10/17801011
- Thread: https://ratatoskr.run/linux-fbdev/2026/10/17801011/t.md

```text
The goto exit statement jumps directly to the following label.
Remove the unnecessary jump and label, and simplify the conditional
block.

Signed-off-by: Haasham Khan <redacted>
---
 drivers/staging/sm750fb/sm750.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 21e310274330..66b015959963 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -815,12 +815,9 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
 	var->vmode = FB_VMODE_NONINTERLACED;
 
 	ret = fb_alloc_cmap(&info->cmap, 256, 0);
-	if (ret < 0) {
+	if (ret < 0)
 		dev_err(info->device, "Could not allocate memory for cmap.\n");
-		goto exit;
-	}
 
-exit:
 	lynxfb_ops_check_var(var, info);
 	return ret;
 }
-- 
2.53.0

```
