From patchwork Mon Nov 27 21:21:18 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: 10078141 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 3B955602BC for ; Mon, 27 Nov 2017 21:26:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DB1728F8C for ; Mon, 27 Nov 2017 21:26:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 229BE28FF8; Mon, 27 Nov 2017 21:26:33 +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 9330628F8C for ; Mon, 27 Nov 2017 21:26:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA3A26E3BD; Mon, 27 Nov 2017 21:26:31 +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 [217.72.192.78]) by gabe.freedesktop.org (Postfix) with ESMTPS id 779D26E3BD for ; Mon, 27 Nov 2017 21:26:30 +0000 (UTC) Received: from [192.168.1.3] ([77.182.143.129]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MeSGJ-1eUFvL0p6V-00QDHP; Mon, 27 Nov 2017 22:21:20 +0100 Subject: [PATCH 1/5] radeon_backlight: Delete an error message for a failed memory allocation 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: Date: Mon, 27 Nov 2017 22:21:18 +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:j2B6JjKVEbTmDY+3O9z2rLcXO11eEGgCGfZNq3iav2yyKMetj47 IGDlrS8qlrZzj1Eo6Sj3KPFaNbHPp4c46OXiPGsBH379HTU/qloPU/LP9tjl2/dcC5Ox4Xm ufUAbb9PKth1pDnOGP9OY7SCsxsBazX+UvtWbp8rf7sKtvBsMlxu7yV84p9c2b74MkRfaeu OGdRxQyTYp9N/ke1sn27w== X-UI-Out-Filterresults: notjunk:1; V01:K0:AjE8wSnkRXc=:knm1zYRPPmbOEmABBPg+Fz 8MdWjublpSZCNc0MOxmuKhmX780Roqc0yoN9I0qga75JzHbLBSYVPdUURPIaCgj/8D3LEAvG9 r0z9/k7NZv1HmTqJ+/16Ek6COxW9Xvu59YOex+mEnC1rq6SYV9uc6WSgX611peZHUS0jGk3Pn x7yJ/ytNQK6uS+zuOksCd7Qwmm1C10sAVJJoYwWzU148CHzLV+ZVAdHsmFZ4kD9PuRazVDlHx wUBHxakSZmtAQ4mx0A93UQLXtU2k52WnwBWMC9ZhjaXYsGNZYz+G83H3rM7hQ6zENpne3p0sv tqUnEETq3ZN44HNpT0b5bjcbKOf7epx91VuWvUzcDK22NjW0qqNwlKDHOboLH6hfgU6RYLRK/ hjLNjqUlA/lBWksC5yomkJPC985ac9hh7oMiDaXKnK+huwlnHCbNXG4RPx1K36NMFZfERQPaA J2q9z1exI8zv1RlnlWdOu0xvwFyTNi/DMPECpfy/pabPAgbZ9z0ucve8mOkh5hy0wwXPTbJ9e wPdb1ovqDiyT6QXyUMUKhL9eHS1UZgMZVC+hwlXuuKwvaw5ofRNembHKVo0Vi8xQtB1K9Y5vX 2kYhcHJzxTZTikJIE6LrvnfEheOK+bkjMITX4DaWBsT4wyHBdnseM2K7jnledbSxpNWHtpAZT ZfK06Zv8OtNA07LF115XT2IvvLXiyNvkU6y5vE9eWC5dgEQzS4br2MRUINL2xaktA1e92AsK2 kSveatc5zD+AwXUtL3x7zOFaZtVZG1gqwTD6s5AvZ6W6Mo+WrOXn8JYEvknGosqpECn/m/pWL YxxPHJxpnMy/A0ujCIbCf05UTslyIPtFHYLhFPEZ/4VMIo8SAQ= 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:27:51 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/video/fbdev/aty/radeon_backlight.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/aty/radeon_backlight.c b/drivers/video/fbdev/aty/radeon_backlight.c index 301d6d6aeead..ce5b22d710b3 100644 --- a/drivers/video/fbdev/aty/radeon_backlight.c +++ b/drivers/video/fbdev/aty/radeon_backlight.c @@ -144,10 +144,8 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo) #endif pdata = kmalloc(sizeof(struct radeon_bl_privdata), GFP_KERNEL); - if (!pdata) { - printk("radeonfb: Memory allocation failed\n"); + if (!pdata) goto error; - } snprintf(name, sizeof(name), "radeonbl%d", rinfo->info->node);