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: 10075361 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 5AAF060353 for ; Sun, 26 Nov 2017 13:00:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D08A27CF3 for ; Sun, 26 Nov 2017 13:00:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41DC328AFF; Sun, 26 Nov 2017 13:00:42 +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 E5F4627CF3 for ; Sun, 26 Nov 2017 13:00:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752219AbdKZNAl (ORCPT ); Sun, 26 Nov 2017 08:00:41 -0500 Received: from mout.web.de ([212.227.15.14]:52040 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752217AbdKZNAk (ORCPT ); Sun, 26 Nov 2017 08:00:40 -0500 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 Cc: LKML , kernel-janitors@vger.kernel.org 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== 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: 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;