From patchwork Tue Jan 22 13:18:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10775485 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D1571390 for ; Tue, 22 Jan 2019 13:18:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AB6329D93 for ; Tue, 22 Jan 2019 13:18:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D31D29DDC; Tue, 22 Jan 2019 13:18: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 B4A5529D93 for ; Tue, 22 Jan 2019 13:18:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728451AbfAVNS5 (ORCPT ); Tue, 22 Jan 2019 08:18:57 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:35870 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728239AbfAVNS4 (ORCPT ); Tue, 22 Jan 2019 08:18:56 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190122131854euoutp02469c2c66c82a37355b2a5c80b7880b8b~8LisoB6sR2350623506euoutp02e; Tue, 22 Jan 2019 13:18:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190122131854euoutp02469c2c66c82a37355b2a5c80b7880b8b~8LisoB6sR2350623506euoutp02e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1548163134; bh=aaAZYOoEh3QnvANePUtJW7DSkwfSdYpJd2FXO6yMFAs=; h=From:To:Cc:Subject:Date:References:From; b=BwaJiEd2oGka4UmOlqIfiv4XNh0Ab6pnyYIsh/FUGQDwd9lTn0TyA49q3eDRCIJJ4 IcX1mWH7KvzMiJtu81aKZtWwwN+rlm3QEWM9he0WDt31jl5SAcggixQLV/4VYxVm0q IRYK2Bd/mjlJEgRUA/EsqKR9hjWY9hlsQpnIHJdc= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190122131854eucas1p2fd71b9a3a9c74251ffef81eca3ae8fd9~8Lir9m1-20198001980eucas1p2l; Tue, 22 Jan 2019 13:18:54 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id EF.AD.04806.D38174C5; Tue, 22 Jan 2019 13:18:53 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190122131853eucas1p20d516281d9b8cb85d1829f4e846afc93~8LirP1JJu1968019680eucas1p2a; Tue, 22 Jan 2019 13:18:53 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-7b-5c47183d0a53 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 88.3E.04128.D38174C5; Tue, 22 Jan 2019 13:18:53 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PLQ00591IBDM230@eusync4.samsung.com>; Tue, 22 Jan 2019 13:18:52 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Eduardo Valentin , Daniel Lezcano , Zhang Rui , Marian Mihailescu Subject: [PATCH] thermal: samsung: Fix incorrect check after code merge Date: Tue, 22 Jan 2019 14:18:47 +0100 Message-id: <20190122131847.7508-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMIsWRmVeSWpSXmKPExsWy7djPc7q2Eu4xBvPXGFlsnLGe1WLeZ1mL +VeusVqcP7+B3eJz7xFGixnn9zFZrD1yl91i9p2rbBZPHvaxOXB6TJ/ewuSxc9Zddo/Fe14y eWxa1cnmcefaHjaPvi2rGD0+b5ILYI/isklJzcksSy3St0vgylhx8xFjwTfOiiU9e5kbGA9z dDFyckgImEhsvX2QqYuRi0NIYAWjRF//SWaQhJDAZ0aJqddNuxg5wIq2PdeACC9jlFg/Vxui voFJYu2+h+wgCTYBQ4mut11sILaIgL3E7SfL2EGKmAUOMEmc27wPLCEs4C5xZ3YDK4jNIqAq 8XbXL7BlvAI2Eo+X7mSEuEheYvWGA8wgzRICE9gk7l+8zgqRcJGYcGQ7C4QtI3F5cjcLRFEz o0T7jFnsEE4Po8TWOTvYIKqsJQ4fvwjWzSzAJzFp23RmiH94JTrahCBKPCT6Nr5jh/gtVmLB wyusExjFFzAyrGIUTy0tzk1PLTbOSy3XK07MLS7NS9dLzs/dxAiMutP/jn/dwbjvT9IhRgEO RiUeXo5zrjFCrIllxZW5hxglOJiVRHhdL7rFCPGmJFZWpRblxxeV5qQWH2KU5mBREuetZngQ LSSQnliSmp2aWpBaBJNl4uCUamBMKPtoZCuwdckf9bvc7GmP73/JPjQ14dJdiXmX2JayL5l8 8KHiajmb1+eVTj75kHm+IOvIVhU+Nh+NRTfMnG0+SXW9ObHtyiv3ZVNY3ivsDet67XlK7SNP QXKz6p1v2yQiZJI1Gb7NtPjbrzp9rdd8JdbOR49bmWJk+sKrrtvK/GavjNngPcFDiaU4I9FQ i7moOBEAbC9rHbYCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpiluLIzCtJLcpLzFFi42I5/e/4NV1bCfcYg1MLmCw2zljPajHvs6zF /CvXWC3On9/AbvG59wijxYzz+5gs1h65y24x+85VNosnD/vYHDg9pk9vYfLYOesuu8fiPS+Z PDat6mTzuHNtD5tH35ZVjB6fN8kFsEdx2aSk5mSWpRbp2yVwZay4+Yix4BtnxZKevcwNjIc5 uhg5OCQETCS2PdfoYuTiEBJYwiix/9ddZginiUli345upi5GTg42AUOJrrddbCC2iIC9xO0n y9hBipgFDjFJHLg/kQUkISzgLnFndgMriM0ioCrxdtcvZhCbV8BG4vHSnYwgtoSAvMTqDQeY JzByLWBkWMUoklpanJueW2ykV5yYW1yal66XnJ+7iREYMtuO/dyyg7HrXfAhRgEORiUe3oQL rjFCrIllxZW5hxglOJiVRHhdL7rFCPGmJFZWpRblxxeV5qQWH2KU5mBREuc9b1AZJSSQnliS mp2aWpBaBJNl4uCUamBMF+qQeGOxr1K+zSjq9tLl3/ecPvJ34lajtqTsIkPBssvxP6eLuNl/ iu+dNeeut9WalIsSpS/KHvfrXpi+2/RB6qumhfO2JR8RnX1/rmjuodvXbr6b36iYxVH2a8k9 85icB+WNj5/bvPz05baXrCGTwdSnSU1fF14OVNgv7/RX6HLzA/5tWkz1SizFGYmGWsxFxYkA E7WeBRUCAAA= X-CMS-MailID: 20190122131853eucas1p20d516281d9b8cb85d1829f4e846afc93 CMS-TYPE: 201P X-CMS-RootMailID: 20190122131853eucas1p20d516281d9b8cb85d1829f4e846afc93 References: 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 Merge commit 19785cf93b6c ("Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal") broke the code introduced by commit ffe6e16f14fa ("thermal: exynos: Reduce severity of too early temperature read"). Restore the original code from the mentioned commit to finally fix the warning message during boot: thermal thermal_zone0: failed to read out thermal zone (-22) Reported-by: Marian Mihailescu Signed-off-by: Marek Szyprowski Fixes: 19785cf93b6c ("Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal") Reviewed-by: Krzysztof Kozlowski --- 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 48eef552cba4..fc9399d9c082 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -666,7 +666,7 @@ static int exynos_get_temp(void *p, int *temp) struct exynos_tmu_data *data = p; int value, ret = 0; - if (!data || !data->tmu_read || !data->enabled) + if (!data || !data->tmu_read) return -EINVAL; else if (!data->enabled) /*