Skip to contentSkip to conversation

staging: sm750fb: remove unnecessary goto

PATCH New Haasham Khan 1 participant 1 message Oct 25

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: sm750fb: remove unnecessary goto

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

---
 drivers/staging/sm750fb/sm750.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/sm750fb/sm750.c +1 -4
index 21e310274330..66b015959963 100644
@@ -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;
 }
Signature · 1 line
2.53.0