lkml.org 
[lkml]   [2017]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/5] radeon_backlight: Delete an error message for a failed memory allocation in radeonfb_bl_init()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 27 Nov 2017 21:27:51 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/video/fbdev/aty/radeon_backlight.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/aty/radeon_backlight.c b/drivers/video/fbdev/aty/radeon_backlight.c
index 301d6d6aeead..ce5b22d710b3 100644
--- a/drivers/video/fbdev/aty/radeon_backlight.c
+++ b/drivers/video/fbdev/aty/radeon_backlight.c
@@ -144,10 +144,8 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)
#endif

pdata = kmalloc(sizeof(struct radeon_bl_privdata), GFP_KERNEL);
- if (!pdata) {
- printk("radeonfb: Memory allocation failed\n");
+ if (!pdata)
goto error;
- }

snprintf(name, sizeof(name), "radeonbl%d", rinfo->info->node);

--
2.15.0
\
 
 \ /
  Last update: 2017-11-27 22:26    [W:0.040 / U:0.804 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site