diff options
| author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-11-09 12:09:29 -0500 |
|---|---|---|
| committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2017-11-09 12:09:29 -0500 |
| commit | 0620865611c9e398f8feaccbe49be946bc6e04d1 (patch) | |
| tree | 74f50cb6092a292d0eb9600a08d24d93073ae86e | |
| parent | 58a81afcffeb457e56e8498c8bf5b73c1623c0b5 (diff) | |
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
| -rw-r--r-- | drivers/video/fbdev/au1200fb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c index 970ce761ff89..687ea2a8f810 100644 --- a/drivers/video/fbdev/au1200fb.c +++ b/drivers/video/fbdev/au1200fb.c | |||
| @@ -1518,7 +1518,7 @@ static irqreturn_t au1200fb_handle_irq(int irq, void* dev_id) | |||
| 1518 | static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev) | 1518 | static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev) |
| 1519 | { | 1519 | { |
| 1520 | struct fb_info *fbi = fbdev->fb_info; | 1520 | struct fb_info *fbi = fbdev->fb_info; |
| 1521 | int bpp; | 1521 | int bpp, ret; |
| 1522 | 1522 | ||
| 1523 | fbi->fbops = &au1200fb_fb_ops; | 1523 | fbi->fbops = &au1200fb_fb_ops; |
| 1524 | 1524 | ||
| @@ -1550,10 +1550,11 @@ static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev) | |||
| 1550 | return -ENOMEM; | 1550 | return -ENOMEM; |
| 1551 | } | 1551 | } |
| 1552 | 1552 | ||
| 1553 | if (fb_alloc_cmap(&fbi->cmap, AU1200_LCD_NBR_PALETTE_ENTRIES, 0) < 0) { | 1553 | ret = fb_alloc_cmap(&fbi->cmap, AU1200_LCD_NBR_PALETTE_ENTRIES, 0); |
| 1554 | if (ret < 0) { | ||
| 1554 | print_err("Fail to allocate colormap (%d entries)", | 1555 | print_err("Fail to allocate colormap (%d entries)", |
| 1555 | AU1200_LCD_NBR_PALETTE_ENTRIES); | 1556 | AU1200_LCD_NBR_PALETTE_ENTRIES); |
| 1556 | return -EFAULT; | 1557 | return ret; |
| 1557 | } | 1558 | } |
| 1558 | 1559 | ||
| 1559 | strncpy(fbi->fix.id, "AU1200", sizeof(fbi->fix.id)); | 1560 | strncpy(fbi->fix.id, "AU1200", sizeof(fbi->fix.id)); |
