From patchwork Fri Jun 23 19:38:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 9807241 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 07EAC60349 for ; Fri, 23 Jun 2017 19:39:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF70F28534 for ; Fri, 23 Jun 2017 19:39:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3CED28545; Fri, 23 Jun 2017 19:39:07 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3AE5628534 for ; Fri, 23 Jun 2017 19:39:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=XP65LTIr/2PTQa3hfKJep6fPNiAap7rDmWIWOMVEBYY=; b=NPe f9ZrzQSxn3GlLJIswnC77qTnwHdQuJeihbFkk0lY7CgTcYQ3swu9Idua938ZA5oqxvwaxX2GVwy/U PRCIqn01aaJdi6oH1aucTjMprw0/M+VKch5R8MTKs++7rdOBExqxTMANDT3Fu5tF0pF6zuAYv+7uw mZO+FgTE8Yp+x6n8XBWQkAHSKgh1duKsGHnPbzQQcHK6MZDUj+iHuEFzka062gSo0g7tNWdf2qLGl HpUbItvowL/fVJR+punBwTD/RuTwFIqo3Fy1ErCTqd6wakI++gAz6gu4L/o2GPVcLjnB6ocxyw4pb 7j9Qc+g10mPbOFdFiYDFkd/gF36HQgg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dOUQ5-0001U5-G9; Fri, 23 Jun 2017 19:39:05 +0000 Received: from smtp06.smtpout.orange.fr ([80.12.242.128] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dOUQ1-0001Pu-Cm for linux-arm-kernel@lists.infradead.org; Fri, 23 Jun 2017 19:39:03 +0000 Received: from localhost.localdomain ([92.140.158.134]) by mwinf5d63 with ME id cKeF1v01J2uGBYk03KeKUF; Fri, 23 Jun 2017 21:38:23 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Fri, 23 Jun 2017 21:38:23 +0200 X-ME-IP: 92.140.158.134 From: Christophe JAILLET To: rui.zhang@intel.com, edubezval@gmail.com, eric@anholt.net, stefan.wahren@i2se.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, kernel@martin.sperl.org, rafal@milecki.pl Subject: [PATCH] thermal: bcm2835: Date: Fri, 23 Jun 2017 21:38:11 +0200 Message-Id: <20170623193811.8016-1-christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170623_123901_758907_20C9A520 X-CRM114-Status: UNSURE ( 9.29 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Christophe JAILLET , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 'tz' is a valid pointer at this point, so calling PTR_ERR on it is pointless. This 'err = PTR_ERR(tz)' looks like a cut'n'paste from a few lines above. So remove it. 'err' is already the error we want to report. Signed-off-by: Christophe JAILLET --- drivers/thermal/broadcom/bcm2835_thermal.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c index 0ecf80890c84..e6863c841662 100644 --- a/drivers/thermal/broadcom/bcm2835_thermal.c +++ b/drivers/thermal/broadcom/bcm2835_thermal.c @@ -245,7 +245,6 @@ static int bcm2835_thermal_probe(struct platform_device *pdev) */ err = tz->ops->get_trip_temp(tz, 0, &trip_temp); if (err < 0) { - err = PTR_ERR(tz); dev_err(&pdev->dev, "Not able to read trip_temp: %d\n", err);