Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c097b06 authored by Markus Elfring's avatar Markus Elfring Committed by Bartlomiej Zolnierkiewicz
Browse files

video: udlfb: Return an error code only as a constant in dlfb_realloc_framebuffer()



* Return an error code without storing it in an intermediate variable.

* Delete the label "error" and local variable "retval"
  which became unnecessary with this refactoring.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Cc: Bernie Thompson <bernie@plugable.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent b78f8ca8
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -1135,7 +1135,6 @@ static struct fb_ops dlfb_ops = {
 */
static int dlfb_realloc_framebuffer(struct dlfb_data *dlfb, struct fb_info *info)
{
	int retval = -ENOMEM;
	int old_len = info->fix.smem_len;
	int new_len;
	unsigned char *old_fb = info->screen_base;
@@ -1151,7 +1150,7 @@ static int dlfb_realloc_framebuffer(struct dlfb_data *dlfb, struct fb_info *info
		new_fb = vmalloc(new_len);
		if (!new_fb) {
			dev_err(info->dev, "Virtual framebuffer alloc failed\n");
			goto error;
			return -ENOMEM;
		}

		if (info->screen_base) {
@@ -1180,11 +1179,7 @@ static int dlfb_realloc_framebuffer(struct dlfb_data *dlfb, struct fb_info *info
			dlfb->backing_buffer = new_back;
		}
	}

	retval = 0;

error:
	return retval;
	return 0;
}

/*