From patchwork Mon Nov 27 21:27:32 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: 10078149 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 28227602BC for ; Mon, 27 Nov 2017 21:27:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1978928FF4 for ; Mon, 27 Nov 2017 21:27:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E58429064; Mon, 27 Nov 2017 21:27:50 +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 E2D2728FF4 for ; Mon, 27 Nov 2017 21:27:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751772AbdK0V1s (ORCPT ); Mon, 27 Nov 2017 16:27:48 -0500 Received: from mout.web.de ([212.227.15.3]:50159 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751776AbdK0V1r (ORCPT ); Mon, 27 Nov 2017 16:27:47 -0500 Received: from [192.168.1.3] ([77.182.143.129]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M25Bz-1f8nAk3Yp1-00u3b0; Mon, 27 Nov 2017 22:27:33 +0100 Subject: [PATCH 4/5] radeon_backlight: Return directly after a failed kmalloc() 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: <3c7e74d9-0be1-cbfd-4070-d60904c55696@users.sourceforge.net> Date: Mon, 27 Nov 2017 22:27:32 +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:g95XAH99tMcpkD0k1lUy1RXLJgfvGZy5FR7EOnTLA3/gunPhK2W 323eXyXN8/kBoNwxnWm1IxmfzCkcGwaEsibM5gvA1KgWrYKJ/GRVlCqoyBxe34m3cDkWBgB fq5VnwoLKdhkOlxJyY2fYk+B+fz8LUkCIfIY+hgb8CWr83WkTJJ2ry37aKnCsxhdXJemy0m YICKy0Bj5FYbSS/t1RyOQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:xh65CvZVY6Y=:py8clW7LjHfWI98T7PxOTd UvQ7pt3pViZG9c41C2bpRiMQtdFwUFwtWej8F3u+f52iJstVaq7JtVc22Ua2hOYXaWu/Cxv2x mDpHkCshxRg9ljF1usceDht7cM+1CCq5rum+XhWX/u81kBZVNJZMwvMz1tN7fRzFRXXX8JDMM 4tBl+0HklzIp9g6gHf+9gU2/QctphCsMOPr/6os+LqqJ4QA+fkqrpVpe2qmNtUoysofnavL0I r41U87LOEEggk8uqyIAdZGc+tNhEFrI73lCNiE55D+/Bj4o9eDe5+AhU1ygHFwxssa2gHwgWJ CeoiWig1vICw6kF/J3Fwq6Pp0g5E5b8z+iMXtjoOZEYW4Sw4rZxxXJAfH8BcSkxGLE9eWFynC VRzgY+icE6IK5o7ExpuAPlLvwiXBToRpoHiJuWIg60ZhTY6T7B9nPlBtHxZQqmbF98DHEE+RB +uN2I8MPuj0O5olWn3NSQ/aQC5M7NtoNmV//e4jNpmn93F50NzHLyNV+YRXMa46+eaJfq/rsh Cg+knsyUwugFn+josOEvwE1QPGdykaLH4SpyItpaoCHIab5IYTQAcU3MU8jJwPgImhU4OSMfv nTFpvJ22cVtFFtq8ItIwlXfTaKG4I0V3ZpAXV+lN9pO8Yq60Jwc5maFUpwWTBDME7DR6nhFFu UMkgCNDtk9mm/tJg6xKHRE1tk5K2OTrBG+Dav0Qgd/9sN6USU5IRXHtcPdbwBMzgz2ktCaQuY JdwyvzBNsml107jG1vF6QvNBBbdHIwspYB57Y+yTWk8sAZe7ARQ7fgsi3iIr5MZtoJoaqdi5i 2KoLFmdDtmeg2BNcMjNiUSFZlqxleNk8kvqybV1lpSrI4Z43yQ= 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 21:50:28 +0100 Return directly after a call of the function "kmalloc" failed at the beginning. Signed-off-by: Markus Elfring --- 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);