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: 10078147 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 B4E3F602BC for ; Mon, 27 Nov 2017 21:27:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A59AA28FF4 for ; Mon, 27 Nov 2017 21:27:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 99CD529064; Mon, 27 Nov 2017 21:27:47 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3B65128FF4 for ; Mon, 27 Nov 2017 21:27:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7608E6E3C0; Mon, 27 Nov 2017 21:27:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.web.de (mout.web.de [212.227.15.3]) by gabe.freedesktop.org (Postfix) with ESMTPS id D7D546E3C0 for ; Mon, 27 Nov 2017 21:27:44 +0000 (UTC) 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 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= Cc: kernel-janitors@vger.kernel.org, LKML X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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);