From 0adcdbcb179624d7b3677264f2cd228e7d89eea9 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Fri, 28 Jun 2019 12:30:08 +0200 Subject: 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" Cc: Jiri Kosina Cc: Benjamin Tissoires Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/hid/hid-picolcd_fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/hid') diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c index 6897e14e7cb7..e162a668fb7e 100644 --- a/drivers/hid/hid-picolcd_fb.c +++ b/drivers/hid/hid-picolcd_fb.c @@ -512,10 +512,8 @@ int picolcd_init_framebuffer(struct picolcd_data *data) sizeof(struct fb_deferred_io) + sizeof(struct picolcd_fb_data) + PICOLCDFB_SIZE, dev); - if (info == NULL) { - dev_err(dev, "failed to allocate a framebuffer\n"); + if (!info) goto err_nomem; - } info->fbdefio = info->par; *info->fbdefio = picolcd_fb_defio; -- cgit v1.2.3-55-g7522