From patchwork Wed Apr 26 15:37:58 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: 9701577 X-Patchwork-Delegate: eduardo.valentin@ti.com 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 882ED603F6 for ; Wed, 26 Apr 2017 15:42:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 713D9285EC for ; Wed, 26 Apr 2017 15:42:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6643F285EF; Wed, 26 Apr 2017 15:42:58 +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 F1D22285EC for ; Wed, 26 Apr 2017 15:42:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966722AbdDZPiV (ORCPT ); Wed, 26 Apr 2017 11:38:21 -0400 Received: from mout.web.de ([217.72.192.78]:65464 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934967AbdDZPiK (ORCPT ); Wed, 26 Apr 2017 11:38:10 -0400 Received: from [192.168.1.2] ([77.182.112.5]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MC1fA-1dCASN45sO-008v6A; Wed, 26 Apr 2017 17:38:00 +0200 Subject: [PATCH 2/3] ti-soc-thermal: Delete error messages for failed memory allocations in ti_bandgap_build() From: SF Markus Elfring To: linux-pm@vger.kernel.org, linux-omap@vger.kernel.org, Eduardo Valentin , Keerthy , Zhang Rui Cc: LKML , kernel-janitors@vger.kernel.org, Wolfram Sang References: Message-ID: <65329026-ad0d-df20-1ff6-4befab001b3c@users.sourceforge.net> Date: Wed, 26 Apr 2017 17:37:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:0afrVAK/Z5xpz7y07f/MFmL8IkmMMfNFni1EYGN58kcYPg+3+4O VySfRn5QnTRMGx12ZQ8rRJeCVDPszW+EATgvDcLHKG8V1UYBXug72fb1e5C3/7bOmUTdXK9 kh7+KjuLBb3Y93TiU05tnCTIv/ijnppLSRmQy4ITjdIpD6TzwCvg82g2t18xf26jz/rX9vh UjRAxBYiRO+MNOJLH17oQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:M4GzB6ZKxx4=:oAhWH+43rdy/5/XQbRcrID J039c0THi958zt4EUj0ZJqqD7nOr8Yqhspj1v7He0D80WztIJgng4JaOUj42zXbhDcSWsZJGU ftCtAVI5ISZPU5l/1At56unbffCc8vFHUmr+0WL2X1NumAqggHzW8+0eM4K7bkpubQ3h+n3IW Xnl5SZUl0BOrLwwRKTH3nOtoCyxeJFwQSxjwwKY5uDz3PARZ9Hh+NXa38CWlEC7pIuHroeblY kdgO4XiR5zacwGTsSAvx9j50KavD+9LPahTUK4XzGCGtz+d+z2ikdDebPEiRfTJXWhb9ciiFE udT2Mpi3XhDP59VoUXEU/G1HajT3Z10jM6+fdwP0Y9vKrUE8Y1AC7or2a9clJQbnaeXThPfTf sSMaT949n32NmbtIDr1IpnbmrBl7cmo6l5tOPXoJfFgWq5lkS7aFTbbXICbWIykbhFke77Zh6 ZaIHNtdrL8kPnxzMSk9u499iEYBO4nxLIvlw2zOAD1w2EkhfDLFtL0QdFOKfkHP84sIw+VzbC p56OxKvQFtsKmrXQorwhcQ5dq7d7CawC+f5kgVMdZ+v8NBRyso6dIgZlOXNluIfoVpFkkIzMw IHIiW/+BTyk94El/6xY5EQtt/friWHUi4csHaHZpbc5Sni20TL+UHPgegH1bIyQnK4+HpvE+a QcHU021vWMrxGKge/Ba7SNkYRuzOudyTkExvnpr1kVCgxqGil632WLdaVikhl//Ahvq6uv3MY 8JWSmD8eAjSAoMqpPgrvKLL+llGi5TewtqcZ+EITuwcu1kiQMUNm7M2/9gcJd9adCC1mgPZZi htKc4Wj Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Wed, 26 Apr 2017 17:03:07 +0200 The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such statements here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Reviewed-by: Keerthy --- drivers/thermal/ti-soc-thermal/ti-bandgap.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c index f19cb7612a65..109fb0a5f19f 100644 --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c @@ -1217,7 +1217,5 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev) - if (!bgp) { - dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n"); + if (!bgp) return ERR_PTR(-ENOMEM); - } of_id = of_match_device(of_ti_bandgap_match, &pdev->dev); if (of_id) @@ -1229,7 +1227,5 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev) - if (!bgp->regval) { - dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n"); + if (!bgp->regval) return ERR_PTR(-ENOMEM); - } i = 0; do {