From patchwork Mon Nov 27 17:58:22 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: 10077715 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 43A49602BD for ; Mon, 27 Nov 2017 17:59:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39E5328943 for ; Mon, 27 Nov 2017 17:59:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E5EE28E7D; Mon, 27 Nov 2017 17:59:04 +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 D1BA228943 for ; Mon, 27 Nov 2017 17:59:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753974AbdK0R7D (ORCPT ); Mon, 27 Nov 2017 12:59:03 -0500 Received: from mout.web.de ([212.227.17.11]:54760 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753441AbdK0R7C (ORCPT ); Mon, 27 Nov 2017 12:59:02 -0500 Received: from [192.168.1.3] ([77.182.143.129]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MC1fA-1eSDNt1Uye-008ucn; Mon, 27 Nov 2017 18:58:53 +0100 Subject: [PATCH 1/3] video: au1100fb: Delete an error message for a failed memory allocation in au1100fb_drv_probe() From: SF Markus Elfring To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz Cc: LKML , kernel-janitors@vger.kernel.org References: <980dc009-429b-ad88-966b-0e75808cbacc@users.sourceforge.net> Message-ID: Date: Mon, 27 Nov 2017 18:58:22 +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: <980dc009-429b-ad88-966b-0e75808cbacc@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:089XZnH2snQbWybCdLjEmfpsSBx2G1anS9NCKiaG+9ayvXE+rXa 16WrHq/zCuVzMbC/FE+ChK+XgfpubTWTF5HFHfrFg4lYYjjl+BEwrVuIuhYNzd8aAhSsb97 BVdcn000Q9vo1nNmc/HvF+s/5j+J6gPsyUCja3zFaZkex++u0kxj50PvUt2YSjij+CDJSSV WjHYapSMgina5TsypplqA== X-UI-Out-Filterresults: notjunk:1; V01:K0:Cn2puTcTBc0=:SlA/38XXaVd256A9SdqHTG ShkZRjxE07XTGuKN31tceHdwtPmxQBAv5Ytr0GKTnj5Lr750tIBtoDQzLQi5gqbXbm+5ktPPc g02iuamBMrO6isjCyWkOD9p6hksAydz0GsambG+BmGjhK6RO/zrZsoJAbG8apX+WYWpE6WNT2 AinwthjuVKa9oTRGrYjyc3gKXfZGXuSrzgf12E8nj1ea6ShE7OGMdgaa5r6Z8VHQokKanb9po CTpgZP26d8rC9NGzbrKt9pdWT3DbxbAfH9swzumTXPE0EW8GbS/Zzl7412gBGuGFlVdRLr6Jc fEDdtzBbiYPh93FJHkgzv5yDR9dJ0dFS8cR3OjaWgor7GcPN/QT68sSwXvP0IOsnPCKVFbw2q Bn1ODS7NZmshboeOFxXdBho4B6qGt4JCNtas8IKy31IkWu8P7HBY1ENXHgRulqqrYZ+tK3FdP Kd1TVKFMrDmBPB7kcHdMzDFLG1DhAMgEdV1Kqgop+bnq1jPFJPc2g7NeQjqB5uGuoHzX0kmFi E2N/4zxF8IijtBzq6PETAiBGF6CWNvmYieT0vDLN54/a0x7ZMibiyzIKR2D2BDqzeyEK38Cf0 0QxuAJToFHSZ1HUUhVUc1A+wyOOONhwdrCTOjm6NnR6jUMO1U7YNQHv/ZeEeP8CQl0mruXbY5 hutJ+xQcklPpDUB+fyY3Cx2577OToAlbWhT70i1Kb3foUjslCJfuSzjUSnXOmaFWZdiP403DS fGoN14HYDvdVCjABmbo3hUWASPiXN0MghZ4tUmG/apNzn28c/2XX7NS3bFtDncfpptH7PucI6 FeGbKzhaL1j9MZahhTk08U896joWv05ZyLtPH8yaD0y8mr1Vi+NkMZteDEeH0csKlN7JKSA 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 18:14:41 +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/au1100fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c index 8de42f617d16..cae17d02d804 100644 --- a/drivers/video/fbdev/au1100fb.c +++ b/drivers/video/fbdev/au1100fb.c @@ -418,10 +418,8 @@ static int au1100fb_drv_probe(struct platform_device *dev) /* Allocate new device private */ fbdev = devm_kzalloc(&dev->dev, sizeof(struct au1100fb_device), GFP_KERNEL); - if (!fbdev) { - print_err("fail to allocate device private record"); + if (!fbdev) return -ENOMEM; - } if (au1100fb_setup(fbdev)) goto failed;