From patchwork Sun Nov 26 18:55:30 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: 10075517 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 03C1860353 for ; Sun, 26 Nov 2017 18:56:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA0EC27C05 for ; Sun, 26 Nov 2017 18:56:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEEE7285FC; Sun, 26 Nov 2017 18:56:02 +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=unavailable 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 97F2927C05 for ; Sun, 26 Nov 2017 18:56:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751418AbdKZSzt (ORCPT ); Sun, 26 Nov 2017 13:55:49 -0500 Received: from mout.web.de ([212.227.15.4]:62421 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbdKZSzr (ORCPT ); Sun, 26 Nov 2017 13:55:47 -0500 Received: from [192.168.1.3] ([78.49.168.181]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M5bEe-1f3RgD0CqG-00xbwV; Sun, 26 Nov 2017 19:55:33 +0100 To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Arvind Yadav , Bartlomiej Zolnierkiewicz , Tomi Valkeinen Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] omapfb/dss: Delete an error message for a failed memory allocation in three functions Message-ID: Date: Sun, 26 Nov 2017 19:55:30 +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:QJ7fLSL7EhHyGr0P6eShDcbvHHRZ3S2+lFlCa0wCn/rbX/sVrC3 83q3fgwB6aYxZgpy30J5h2sHmQcQJDsimZgZN9SzOvg8rA1bxCa8mrtnwU2O0v3jf33tk63 DXsWVGcRiGALVVewngIgYsIGf36jV9csPq65a4LD+73zoXzdrTknQbmhp07F8xJuJMSCeer F3KgBYgE3eqjexNZWWfzA== X-UI-Out-Filterresults: notjunk:1; V01:K0:3obmcIYOgnY=:2akv8dyoJqW2T9X5k4q9L7 BfLXyJMiHci2yZDGPpRngWrHBgfRmrDS3+yMnCSoGRSkP/BQUrU7iwsO7HsqcUyuTu3SxhzKe mhVEQsd6wR6HZ+cF8kSI1cU9NtsOPOvjkpcsOdrEnSztSdsHtkF7JzaVw1ePoc8dF409QZqs2 xw8AT8LelxpvRFzdZa6lBoPlB/0yC7m/Ma9eRkeAVvTJD4U/TF+NptLA23wadfzPlw9rcmKcW E2SYzajTWRrnutEZJcFPVMdXxAqu6nTHKy5Odd5xxdCAslq5FlxI76QNp5lCg4BPnkQF5mqBu TVRQJkuaW9sLcjh77Pio3p1dm0GtPAEBXu5+rL7uKQ/uZK2NCKTCbVQv/18BJTci2IvORb0xH vdxkEKaS9XPPz2FAE71vTSiwJISYzY8+aLR6kzbvFCUQnvzIHThb4tOB4wVx2r1WUxBxhpDFt 3+9bRmD+z19yfM8/lbgYMBOd+oSGZOFmte6Ju+fKIpdukjN8npQBT/7efGyvBjBTGUOyhYPJP zebS17CC/lFM063x822CkCcXsMKEamw+hkRfxWildByy/nkiBUJKd1zlTPq5vqB6f/m7koTTL K7UeQ3wX5zk7JTBUTdsFl2Mix/9m296RHAVjheRxvzNYE+4wsICKqAxQljVyqW8I91sh3idog sBy01SrH6LJwnWNy6nEBaHY3JqkCcNejCEEQBV/o2Y+iFrogBRncVSfFQBJL/by41FdeGTXXy iINio3F9bQXvTso9L2cGI/MK3bNdocTsPwNhjgHEKHCJt/BYOhrwmRLP6YJEROXlLOw9yJgJI SNybAxJOIOkXzzPUSHjCvjznI7M3Xf8LwjB02AXdKz3FbYkTnQ= Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sun, 26 Nov 2017 19:46:09 +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/omap2/omapfb/dss/dispc.c | 4 +--- drivers/video/fbdev/omap2/omapfb/dss/dss.c | 4 +--- drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c index 7a75dfda9845..10164a3bae4a 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c @@ -3982,10 +3982,8 @@ static int dispc_init_features(struct platform_device *pdev) struct dispc_features *dst; dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL); - if (!dst) { - dev_err(&pdev->dev, "Failed to allocate DISPC Features\n"); + if (!dst) return -ENOMEM; - } switch (omapdss_get_version()) { case OMAPDSS_VER_OMAP24xx: diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss.c b/drivers/video/fbdev/omap2/omapfb/dss/dss.c index 48c6500c24e1..a5de13777e2b 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss.c @@ -893,10 +893,8 @@ static int dss_init_features(struct platform_device *pdev) struct dss_features *dst; dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL); - if (!dst) { - dev_err(&pdev->dev, "Failed to allocate local DSS Features\n"); + if (!dst) return -ENOMEM; - } switch (omapdss_get_version()) { case OMAPDSS_VER_OMAP24xx: diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c index 9a13c35fd6d8..d25eea10c665 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c @@ -195,10 +195,8 @@ static int hdmi_phy_init_features(struct platform_device *pdev) const struct hdmi_phy_features *src; dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL); - if (!dst) { - dev_err(&pdev->dev, "Failed to allocate HDMI PHY Features\n"); + if (!dst) return -ENOMEM; - } switch (omapdss_get_version()) { case OMAPDSS_VER_OMAP4430_ES1: