Commit 06208656 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Bartlomiej Zolnierkiewicz

video: fbdev: au1200fb: Propagate an error code

We should propagate the error code returned by 'fb_alloc_cmap()' instead
of returning -EFAULT.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent 58a81afc
...@@ -1518,7 +1518,7 @@ static irqreturn_t au1200fb_handle_irq(int irq, void* dev_id) ...@@ -1518,7 +1518,7 @@ static irqreturn_t au1200fb_handle_irq(int irq, void* dev_id)
static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev) static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev)
{ {
struct fb_info *fbi = fbdev->fb_info; struct fb_info *fbi = fbdev->fb_info;
int bpp; int bpp, ret;
fbi->fbops = &au1200fb_fb_ops; fbi->fbops = &au1200fb_fb_ops;
...@@ -1550,10 +1550,11 @@ static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev) ...@@ -1550,10 +1550,11 @@ static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev)
return -ENOMEM; return -ENOMEM;
} }
if (fb_alloc_cmap(&fbi->cmap, AU1200_LCD_NBR_PALETTE_ENTRIES, 0) < 0) { ret = fb_alloc_cmap(&fbi->cmap, AU1200_LCD_NBR_PALETTE_ENTRIES, 0);
if (ret < 0) {
print_err("Fail to allocate colormap (%d entries)", print_err("Fail to allocate colormap (%d entries)",
AU1200_LCD_NBR_PALETTE_ENTRIES); AU1200_LCD_NBR_PALETTE_ENTRIES);
return -EFAULT; return ret;
} }
strncpy(fbi->fix.id, "AU1200", sizeof(fbi->fix.id)); strncpy(fbi->fix.id, "AU1200", sizeof(fbi->fix.id));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment