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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/video/fbdev/udlfb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/video/fbdev/udlfb.c') diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c index 00b99363e528..c328e8265cb1 100644 --- a/drivers/video/fbdev/udlfb.c +++ b/drivers/video/fbdev/udlfb.c @@ -1686,10 +1686,8 @@ static int dlfb_usb_probe(struct usb_interface *intf, /* allocates framebuffer driver structure, not framebuffer memory */ info = framebuffer_alloc(0, &dlfb->udev->dev); - if (!info) { - dev_err(&dlfb->udev->dev, "framebuffer_alloc failed\n"); + if (!info) goto error; - } dlfb->info = info; info->par = dlfb; -- cgit v1.2.3