[PATCH 4/5] radeon_backlight: Return directly after a failed kmalloc() in radeonfb_bl_init()

From: SF Markus Elfring
Date: Mon Nov 27 2017 - 16:27:52 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 27 Nov 2017 21:50:28 +0100

Return directly after a call of the function "kmalloc" failed
at the beginning.

Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/video/fbdev/aty/radeon_backlight.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/aty/radeon_backlight.c b/drivers/video/fbdev/aty/radeon_backlight.c
index c5e0e3557cc2..7f7ed6f72ddb 100644
--- a/drivers/video/fbdev/aty/radeon_backlight.c
+++ b/drivers/video/fbdev/aty/radeon_backlight.c
@@ -145,7 +145,7 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)

pdata = kmalloc(sizeof(*pdata), GFP_KERNEL);
if (!pdata)
- goto error;
+ return;

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

--
2.15.0