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: Markus Elfring <elfring@users.sourceforge.net> Cc: Bernie Thompson <bernie@plugable.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
parent
b78f8ca82b
commit
3c097b069b
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue