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/pvr2fb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'drivers/video/fbdev/pvr2fb.c') diff --git a/drivers/video/fbdev/pvr2fb.c b/drivers/video/fbdev/pvr2fb.c index ad67f2135d5b..7ff4b6b84282 100644 --- a/drivers/video/fbdev/pvr2fb.c +++ b/drivers/video/fbdev/pvr2fb.c @@ -1072,12 +1072,8 @@ static int __init pvr2fb_init(void) #endif fb_info = framebuffer_alloc(sizeof(struct pvr2fb_par), NULL); - - if (!fb_info) { - printk(KERN_ERR "Failed to allocate memory for fb_info\n"); + if (!fb_info) return -ENOMEM; - } - currentpar = fb_info->par; -- cgit v1.2.3