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: 10078145 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 F3997602BC for ; Mon, 27 Nov 2017 21:26:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E590828FF4 for ; Mon, 27 Nov 2017 21:26:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA73729064; Mon, 27 Nov 2017 21:26: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=-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 695BE28FF4 for ; Mon, 27 Nov 2017 21:26:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752259AbdK0V0e (ORCPT ); Mon, 27 Nov 2017 16:26:34 -0500 Received: from mout.web.de ([217.72.192.78]:56317 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752251AbdK0V0d (ORCPT ); Mon, 27 Nov 2017 16:26:33 -0500 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 Cc: LKML , kernel-janitors@vger.kernel.org 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= 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: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);