diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2019-06-28 12:30:08 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2019-06-28 12:30:08 +0200 |
commit | 0adcdbcb179624d7b3677264f2cd228e7d89eea9 (patch) | |
tree | 72c9a50d59fec3ebfb463604efcb17c198b831de /drivers/video/fbdev/aty/aty128fb.c | |
parent | video: fbdev: intelfb: return -ENOMEM on framebuffer_alloc() failure (diff) | |
download | linux-0adcdbcb179624d7b3677264f2cd228e7d89eea9.tar.xz linux-0adcdbcb179624d7b3677264f2cd228e7d89eea9.zip |
video: fbdev: don't print error message on framebuffer_alloc() failure
framebuffer_alloc() can fail only on kzalloc() memory allocation
failure and since kzalloc() will print error message in such case
we can omit printing extra error message in drivers (which BTW is
what the majority of framebuffer_alloc() users is doing already).
Cc: "Bruno Prémont" <bonbons@linux-vserver.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video/fbdev/aty/aty128fb.c')
-rw-r--r-- | drivers/video/fbdev/aty/aty128fb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c index b02e67528a99..8504e19437ff 100644 --- a/drivers/video/fbdev/aty/aty128fb.c +++ b/drivers/video/fbdev/aty/aty128fb.c @@ -2103,10 +2103,9 @@ static int aty128_probe(struct pci_dev *pdev, const struct pci_device_id *ent) /* We have the resources. Now virtualize them */ info = framebuffer_alloc(sizeof(struct aty128fb_par), &pdev->dev); - if (info == NULL) { - printk(KERN_ERR "aty128fb: can't alloc fb_info_aty128\n"); + if (!info) goto err_free_mmio; - } + par = info->par; info->pseudo_palette = par->pseudo_palette; |