From patchwork Mon Nov 27 21:28:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10078157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A3666602BC for ; Mon, 27 Nov 2017 21:28:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94B8828F8C for ; Mon, 27 Nov 2017 21:28:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 890B328FF8; Mon, 27 Nov 2017 21:28:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E26028F8C for ; Mon, 27 Nov 2017 21:28:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752268AbdK0V2p (ORCPT ); Mon, 27 Nov 2017 16:28:45 -0500 Received: from mout.web.de ([212.227.15.3]:53291 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751686AbdK0V2o (ORCPT ); Mon, 27 Nov 2017 16:28:44 -0500 Received: from [192.168.1.3] ([77.182.143.129]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MP08F-1eEmG73pMF-006PzU; Mon, 27 Nov 2017 22:28:32 +0100 Subject: [PATCH 5/5] radeon_backlight: Delete a jump target in radeonfb_bl_init() From: SF Markus Elfring To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz , Benjamin Herrenschmidt Cc: LKML , kernel-janitors@vger.kernel.org References: <93c99f89-2d97-0e95-fe57-7b7a0824e864@users.sourceforge.net> Message-ID: <3b2295cf-59c8-b5af-25e5-c1d075093e19@users.sourceforge.net> Date: Mon, 27 Nov 2017 22:28:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <93c99f89-2d97-0e95-fe57-7b7a0824e864@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:1WuVzwNzBHCQMKWPvfIWk+TnfjwUZZb7EYsCJWz0isc4kkRMFVm UEUiyx6q0d8xPaYz7sYREI0GALLQkzgSeOFGjQVljsbaWBiadlJ/baSg+3KN0oyITXNP/FU G62ghvLT5WG3NWgI8cK8ks8++HpFjlvrGJJrEUTjLAN91k5VWZ4hB8h1/fVpvhGQ0WQ17DA f1SHknZwVqaMrIeT+2X2A== X-UI-Out-Filterresults: notjunk:1; V01:K0:cPwGwq+z5gQ=:tkAVdKg+WH9RsxGFdRqIoy E9SFgvmwV1HVCo9/Z0DDWw1ySpfpD8wnd/yLK6EHgoS7vDMiH4dj5OC8OCpMQqAgBqccnTfAz Kml2Ahhok5csVRIV08CdwjoSNl+phcOpNGLSOWSc+T0LUvxG2YOT3a/xvlIP6gP8z3wtxNePg a1FpdKqzTHLY/NsLGtLaQ+pB2taS2busTBNiT7AOiWlhpTljO6BzEcPDGsK2ns1hUcMyvCWoS COMHXPmVwuzNlAARjjzbc8l99Uz84zshCO2J2SnocPfqyo7ilL1wO3lkE8zIjYgSaxn2JcW8e IAOggRVtJHPDtJrbZUDa4swN4tbYHaJ1jofUz59WcywWSSWZ23Zqsh7YCMgWH+aAoJsSnO1/h AuNGKoOUzoQhwNvq7yeP+WNlumdbZKWXtd2xslJCBlUz7zXpYfcU09CvrCOYMzxS631pKOPOU j57Pj0urI2pf6r5E2pB9VuTl5VY8rgkMLAfwFuUjlZHsjSt60db6yguSV+Eku6aTHyDN/heGY zU+0eaUZLAAXqTLiuAGqvXoJBXitgG9KfVFrqeBKN1PRM5H17H85TQAUY0eUZ0GJ5ieIxCkrm d4/ylReg6XNSlUQ8OXUauZFvaG8FuSi8gFE5zsl7Pi5erz/iGahn428GoA0hVQEI9FuJ3eBi+ qyVl8NQQbiHEnoGCut68Eb+nZsLaex69orOCqg57EA9dY5RYqSc+atYeqsgktcGvYtvkwQbZd ihR9vrFlUlB1m955PA8U/6jjsNXWXvkeyi/gNp53XzzznEbrDgfP3ZTiZO+OzllInhifBCmf8 tKMTi61Yc19P/fya8oMeWxVdEPnn9V66Ki8wv3IS/uAOkXMTFI= Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring 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 --- 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)