From patchwork Thu Oct 8 05:34:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 7348981 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 02485BEEA4 for ; Thu, 8 Oct 2015 05:35:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3B04120504 for ; Thu, 8 Oct 2015 05:35:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4957F204B5 for ; Thu, 8 Oct 2015 05:35:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751851AbbJHFfP (ORCPT ); Thu, 8 Oct 2015 01:35:15 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:41206 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751302AbbJHFfN (ORCPT ); Thu, 8 Oct 2015 01:35:13 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NVV00HD0ZIMUL70@mailout3.w1.samsung.com>; Thu, 08 Oct 2015 06:35:10 +0100 (BST) X-AuditID: cbfec7f5-f794b6d000001495-17-5616008e4007 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 49.AD.05269.E8006165; Thu, 8 Oct 2015 06:35:10 +0100 (BST) Received: from localhost.localdomain ([10.252.80.64]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NVV001ENZIA2J60@eusync4.samsung.com>; Thu, 08 Oct 2015 06:35:10 +0100 (BST) From: Krzysztof Kozlowski To: Lukasz Majewski , Zhang Rui , Eduardo Valentin , Kukjin Kim , Krzysztof Kozlowski , linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] thermal: exynos: Use IS_ERR() because regulator cannot be NULL Date: Thu, 08 Oct 2015 14:34:04 +0900 Message-id: <1444282446-6419-3-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1444282446-6419-1-git-send-email-k.kozlowski@samsung.com> References: <1444282446-6419-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprGLMWRmVeSWpSXmKPExsVy+t/xa7p9DGJhBi++SlnMv3KN1eL1C0OL /sevmS3ePNzMaLHpMVDo8q45bBafe48wWsw4v4/J4snDPjYHTo+ds+6yeyze85LJY9OqTjaP zUvqPfq2rGL0+LxJLoAtissmJTUnsyy1SN8ugSvj2+3V7AUL2SrerN/L1MC4lrWLkZNDQsBE YtGLX1C2mMSFe+vZuhi5OIQEljJK7Js+Acr5zyhx6uR9JpAqNgFjic3Ll4AlRATOMEmc7NjK CJIQFgiVmDVtB9goFgFVic+3p4DFeQXcJFb23WSGWCEncfLYZLAaTgF3iXc3DoPVCAHVrF0w j3UCI88CRoZVjKKppckFxUnpuUZ6xYm5xaV56XrJ+bmbGCGh9XUH49JjVocYBTgYlXh4fxiL hAmxJpYVV+YeYpTgYFYS4d05XzRMiDclsbIqtSg/vqg0J7X4EKM0B4uSOO/MXe9DhATSE0tS s1NTC1KLYLJMHJxSDYytMvEXrJ+oF9Rsf/LF6Q9zwfyn0aINN47vXrStdkZ2d2vFZKkzH86c VH7mLWDB83Ha6Uff/ybe3SNQ1OwfZ5Y302FRYZDv4U2cR/0v6nsvYNvzv/Jlv2JozK+Pe79J lGcJz7tW1mLwdukT5nUPpwSGnen2+ZzAG840yfZkTJ+wrEPOAakjrqFKLMUZiYZazEXFiQCY HuOkKQIAAA== Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The NULL check in probe's error path is not needed because in that time the regulator cannot be NULL (regulator_get() returns valid pointer or ERR_PTR). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Acked-by: Lukasz Majewski Tested-by: Lukasz Majewski --- drivers/thermal/samsung/exynos_tmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index bc71a61f0c4a..eac6aebf82f3 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -1396,7 +1396,7 @@ err_clk_sec: if (!IS_ERR(data->clk_sec)) clk_unprepare(data->clk_sec); err_sensor: - if (!IS_ERR_OR_NULL(data->regulator)) + if (!IS_ERR(data->regulator)) regulator_disable(data->regulator); return ret;