From patchwork Sun Nov 26 13:00:16 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: 10075359 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 505EE60353 for ; Sun, 26 Nov 2017 13:00:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 466152847B for ; Sun, 26 Nov 2017 13:00:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AF8027CF3; Sun, 26 Nov 2017 13:00:41 +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 B180727CF3 for ; Sun, 26 Nov 2017 13:00:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A5A776E1C0; Sun, 26 Nov 2017 13:00:38 +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.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id A2DE46E1C0 for ; Sun, 26 Nov 2017 13:00:37 +0000 (UTC) Received: from [192.168.1.3] ([78.49.168.181]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M9XP5-1eQKOS3Uv1-00Cypz; Sun, 26 Nov 2017 14:00:20 +0100 To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Arvind Yadav , Bartlomiej Zolnierkiewicz , Geert Uytterhoeven , Kees Cook , Wei Yongjun From: SF Markus Elfring Subject: [PATCH] video: sh_mobile_lcdcfb: Delete an error message for a failed memory allocation in two functions Message-ID: <478c51ab-b4ef-47e1-0b53-8b4e1f3b931a@users.sourceforge.net> Date: Sun, 26 Nov 2017 14:00:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:JFcTwDhOy2BwrcLdHeicN3xf3JuHuJt0Gg3B2yxGew9K5z35D69 Zm/kmR135z+KZGPfCsubHJFZ+AeQxo+tsVaCQgo0uMdjhkVFL7IATYsYfuJUuVZo5603/3J Ljlx+GWhB7BmpxQNS2ykZ71iuDzFHTBDYGGXI8lPUzG4E3vEN5xQAGBGk5B7D06TWCwYFdZ yBfqBaReAoa+LRhg6o9lg== X-UI-Out-Filterresults: notjunk:1; V01:K0:Ua6f1sSaGic=:0ZpNkQicx5iXwQqpUl6FWL jpp0kzCbP7nOrGe0UQ0nbP+/pqwjzL2CfaLQWFFbQEqStTBU4mH1fIcHfjY2jvdbQ+j605igB XnHqaN9VDLPmbmSAA8QW4CXgjH7PTmcr6qk6+F0nLeN46eBe1fMSx2LGHM0Q335YzLkPcekGc PQuF5qOs1W5K6fvJkbNYh4UAYlCyqlYHzsnQnaUgPed6w55Kb776TRQMrvo6mVQbF+yW7dUNn WQqTxzhgRvokHL4chibrAYfrlCmR/FG/yrEyoPs8NeaKxDOaRjM8Fc4u4o3EsNdYEKq5/Ko9x zDlncxRd1PzNMPJ9Gd+CsTtq/T6m0N2WzUZpAZTA2v/lS44U0ovQdi9PjBRGqJFYXFSxrdhws 3wHN4qKAKRt0lrHJLTp/B8Jx4zHMMmVw7VGkSo7RsdcpVNAGLYzG/nNa9i5XC+DAZ8NvdfprA /axLoVK9AwaP547UmYNQkRpl62PpSZ0WUuk8UNU5Vu1CmmXMxc+Vfu2NcYsLbbtEl/MHQS9xy JLkKEA7vA20fRKT2aUt4zKU2zCW2kNIO+K+4xb3RNU9AnTez9BqwIGR9XTGszbx+gKLcAML4G YY5/AzYqGEA9h8hrC2zQD5Rod0YUy2sgfPq0cvPPKLnTqx6Md3z7+/LsixUNKGLQBg3DG90qV GX8BGAl+xFqS/Vy/zZus3wF6LIIp6xyELwhzJsasrzWEtdGIiukTjOIAOdfbnT1cJppNFDz8g DKx8am7jqWJSZrbImaIHvdYh1sgubxiDBgcyHjsT5Y+0OVFBj+sqBuDFrsPQ5CFGd4zWRxenw Kqu9bGQQd5hF97JNfKbhisr14Z++DJ899twRMyOfbt+MCtxG+JAblOb8u3Zgwbfm47Khniukt 23NWxhQRmjrgqihmYfA/t1dwamewCOOEZy3Gv3Y0S6bbs5SRd4qV9rxQ0kZskMqQr3U6mDw8z 153511gizrOcL4kxj7ARG6LW6+xfGCGaJzjmcPLRA5A4okd+YycVE/+odva9vVLBSAy6QUprY /g== 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: Sun, 26 Nov 2017 13:48:55 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index c3a46506e47e..0f9b37034eaf 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -2149,10 +2149,8 @@ sh_mobile_lcdc_channel_fb_register(struct sh_mobile_lcdc_chan *ch) if (info->fbdefio) { ch->sglist = vmalloc(sizeof(struct scatterlist) * ch->fb_size >> PAGE_SHIFT); - if (!ch->sglist) { - dev_err(ch->lcdc->dev, "cannot allocate sglist\n"); + if (!ch->sglist) return -ENOMEM; - } } info->bl_dev = ch->bl; @@ -2718,10 +2716,8 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev) } priv = kzalloc(sizeof(*priv), GFP_KERNEL); - if (!priv) { - dev_err(&pdev->dev, "cannot allocate device data\n"); + if (!priv) return -ENOMEM; - } priv->dev = &pdev->dev; priv->meram_dev = pdata->meram_dev;