From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: kernel-janitors@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 5/5] radeon_backlight: Delete a jump target in radeonfb_bl_init()
Date: Mon, 27 Nov 2017 21:28:31 +0000 [thread overview]
Message-ID: <3b2295cf-59c8-b5af-25e5-c1d075093e19@users.sourceforge.net> (raw)
In-Reply-To: <93c99f89-2d97-0e95-fe57-7b7a0824e864@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 27 Nov 2017 22:03:03 +0100
* Replace a goto statement by a direct call of the function "kfree"
in an if branch.
* Delete the jump label "error" which became unnecessary with
this refactoring.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/video/fbdev/aty/radeon_backlight.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/video/fbdev/aty/radeon_backlight.c b/drivers/video/fbdev/aty/radeon_backlight.c
index 7f7ed6f72ddb..3c5b8291e773 100644
--- a/drivers/video/fbdev/aty/radeon_backlight.c
+++ b/drivers/video/fbdev/aty/radeon_backlight.c
@@ -157,7 +157,8 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)
if (IS_ERR(bd)) {
rinfo->info->bl_dev = NULL;
printk("radeonfb: Backlight registration failed\n");
- goto error;
+ kfree(pdata);
+ return;
}
pdata->rinfo = rinfo;
@@ -188,11 +189,6 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)
backlight_update_status(bd);
printk("radeonfb: Backlight initialized (%s)\n", name);
-
- return;
-
-error:
- kfree(pdata);
}
void radeonfb_bl_exit(struct radeonfb_info *rinfo)
--
2.15.0
prev parent reply other threads:[~2017-11-27 21:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 21:20 [PATCH 0/5] Radeon backlight: Adjustments for radeonfb_bl_init() SF Markus Elfring
2017-11-27 21:21 ` [PATCH 1/5] radeon_backlight: Delete an error message for a failed memory allocation in radeonfb_bl_ SF Markus Elfring
2017-11-27 21:25 ` [PATCH 2/5] radeon_backlight: Improve a size determination in radeonfb_bl_init() SF Markus Elfring
2017-11-27 21:26 ` [PATCH 3/5] radeon_backlight: Delete an unnecessary return statement " SF Markus Elfring
2017-11-27 21:27 ` [PATCH 4/5] radeon_backlight: Return directly after a failed kmalloc() " SF Markus Elfring
2017-11-27 21:28 ` SF Markus Elfring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3b2295cf-59c8-b5af-25e5-c1d075093e19@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=b.zolnierkie@samsung.com \
--cc=benh@kernel.crashing.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).