From patchwork Fri Jun 23 19:44:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 9807247 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 8900560349 for ; Fri, 23 Jun 2017 19:45:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 786F7287AD for ; Fri, 23 Jun 2017 19:45:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CDDD287B5; Fri, 23 Jun 2017 19:45:08 +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 2323D287AD for ; Fri, 23 Jun 2017 19:45:08 +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=hKjE5aSupW39lo5QuCqQ0+FZSib/se/J4V1OoqeqV70=; b=TJs mSBHkGDelcIsI9cJ6gW7VjvO20p3sNEb8O1DG4DIi6Uj0A2h+ygIUrZ0GSlOD/Iep2CGK29ZSsesu pkDpHRvnqGT9rJqkI9ozkmfSv5aHsFHiB1bFlLMItnu3DSw2S4vywStk+sKpF/EW93uhx94G4k+GF McjYVRF7BvMcUQV9h//8yGsU+vQm+hTKF2d9k817eTU59/RaIM/wYE3cTfKhqdOer4zuNVwQQ+Wyd f3SVVgiBYBpvykkfxiayK+lJVxlvne4L4xj3P7wGbagwlJDTk+W6xje0TYgTXqoMYCYjANUk2G4gO 1X6gNrq2+gQpaLPgQTIiK4r6eeBwJbA==; 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 1dOUVt-0004Hn-FF; Fri, 23 Jun 2017 19:45: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 1dOUVp-0003ju-Mu for linux-arm-kernel@lists.infradead.org; Fri, 23 Jun 2017 19:45:03 +0000 Received: from localhost.localdomain ([92.140.158.134]) by mwinf5d63 with ME id cKke1v00J2uGBYk03Kkeyp; Fri, 23 Jun 2017 21:44:39 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Fri, 23 Jun 2017 21:44:39 +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 v2] thermal: bcm2835: Fix error code in 'bcm2835_thermal_probe' Date: Fri, 23 Jun 2017 21:44:35 +0200 Message-Id: <20170623194435.8094-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_124502_082202_E13B6EE3 X-CRM114-Status: UNSURE ( 9.71 ) 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 --- v2: fix empty subject --- 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);