[PATCH] staging: sm750fb: remove unnecessary goto
From: Haasham Khan
Date: Sun Oct 25 2026 - 16:27:16 EST
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 <haasham93@xxxxxxxxx>
---
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