Message ID | 20231003111638.241542-5-m.majewski2@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6DAEDE7544A for <linux-arm-kernel@archiver.kernel.org>; Tue, 3 Oct 2023 11:17:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:References:MIME-Version:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DafKRFfl9+1LC+a9MCEhnzpJXJELOKlFErC9EIJMLbw=; b=Gs1EX0clrZ5g6q QepcZXOi7w1Y52Z7PDvgodZeh/DtDHSI1SdbrzZeV8+0M2zK+LKxifXdcrsY/JYN318cYM1ymqeKr e94LOzjUfZO7HvA69g94sKXnQQL679r2z2ByMcakfixKVxoaaz+sQG8hkTld+g/+6mOzDlNrgABdS vDb6smlDYdbq2WSxg0yMq0MAlArMAgTwUQwDQmaA5YxeuGKSPpDlSnz1x0eur25wzhqawYqQjLU2g p1sp1QyDKno/hYlmnJA0E1aF9UFUSiBEqMbI84BEbEkclS/bEifFbeq+F/GIuuF3yQ6Xo7P2507st L/HWhTCWhulohm79ldVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qndOv-00EVrm-11; Tue, 03 Oct 2023 11:17:17 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qndOp-00EVoO-2J for linux-arm-kernel@lists.infradead.org; Tue, 03 Oct 2023 11:17:13 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20231003111710euoutp0197cd5fd1a6bab8e12356483380854cec~KlM-yrY851219812198euoutp01k for <linux-arm-kernel@lists.infradead.org>; Tue, 3 Oct 2023 11:17:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20231003111710euoutp0197cd5fd1a6bab8e12356483380854cec~KlM-yrY851219812198euoutp01k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1696331830; bh=Vg9DFf70aoyV0Kmb3Cb2AWmwbCE2SJj9B9sBvA2HuYg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C5tlqEjBZmPORQTzCLzRx8C7titOhRX8qDeSxK+s75TC7O4X0m8x4n1GxwTeiKOW5 IiBlFnY6+jHSs0cFHYN8JSFLwgX71YVRMc22yKAeoWfx6IYG85Ar28CIr40ZRtq30i s3McVxgfork35cUAEDHLmdUQneCWy/AXuvEFNuKs= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20231003111710eucas1p204e1d3274a5bbb029e30898acee06042~KlM-djcw23094430944eucas1p2t; Tue, 3 Oct 2023 11:17:10 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 6B.F7.42423.638FB156; Tue, 3 Oct 2023 12:17:10 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20231003111709eucas1p21f2d28615faab2f4aa4d9a264cf7f54f~KlM-AFzO62873528735eucas1p2v; Tue, 3 Oct 2023 11:17:09 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20231003111709eusmtrp14a69c0266cc53ac9a752ddb9f6a8a128~KlM_-KruD2246422464eusmtrp1c; Tue, 3 Oct 2023 11:17:09 +0000 (GMT) X-AuditID: cbfec7f2-a51ff7000002a5b7-c6-651bf835d994 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id CC.CE.25043.538FB156; Tue, 3 Oct 2023 12:17:09 +0100 (BST) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231003111708eusmtip29d07bb5541e22c576b800fd54121b136~KlM_LA_L-2772927729eusmtip2I; Tue, 3 Oct 2023 11:17:08 +0000 (GMT) From: Mateusz Majewski <m.majewski2@samsung.com> To: linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Mateusz Majewski <m.majewski2@samsung.com>, Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>, Alim Akhtar <alim.akhtar@samsung.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Marek Szyprowski <m.szyprowski@samsung.com> Subject: [PATCH v3 4/8] thermal: exynos: handle devm_regulator_get_optional return value correctly Date: Tue, 3 Oct 2023 13:16:30 +0200 Message-ID: <20231003111638.241542-5-m.majewski2@samsung.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231003111638.241542-1-m.majewski2@samsung.com> MIME-Version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SuMxc6sX9bfPygPgZ5v43 tIvWfOCYOyXmhaBZYqLiN4E/D9fKfua4uK7A32V2e1lh2QvzVLnafO+Wgz/7p5w9Efl23fKs +I7qVypML0Mbdmd6dq0WYeLm7xX9EXm497vq7tiNS6S2te9WYinOSDTUYi4qTgQAKeRGI0MD AAA= X-CMS-MailID: 20231003111709eucas1p21f2d28615faab2f4aa4d9a264cf7f54f X-Msg-Generator: CA X-RootMTR: 20231003111709eucas1p21f2d28615faab2f4aa4d9a264cf7f54f X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20231003111709eucas1p21f2d28615faab2f4aa4d9a264cf7f54f References: <20231003111638.241542-1-m.majewski2@samsung.com> <CGME20231003111709eucas1p21f2d28615faab2f4aa4d9a264cf7f54f@eucas1p2.samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231003_041712_039030_CE1FCBA5 X-CRM114-Status: GOOD ( 16.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Improve Exynos thermal driver
|
expand
|
On 03/10/2023 13:16, Mateusz Majewski wrote: > Currently, if regulator is required in the SoC, but > devm_regulator_get_optional fails for whatever reason, the execution > will proceed without propagating the error. > > Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com> > --- Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 0e970638193d..6070b03cff9d 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -1002,9 +1002,17 @@ static int exynos_tmu_probe(struct platform_device *pdev) return ret; } } else { - if (PTR_ERR(data->regulator) == -EPROBE_DEFER) + ret = PTR_ERR(data->regulator); + switch (ret) { + case -ENODEV: + break; + case -EPROBE_DEFER: return -EPROBE_DEFER; - dev_info(&pdev->dev, "Regulator node (vtmu) not found\n"); + default: + dev_err(&pdev->dev, "Failed to get regulator: %d\n", + ret); + return ret; + } } ret = exynos_map_dt_data(pdev);
Currently, if regulator is required in the SoC, but devm_regulator_get_optional fails for whatever reason, the execution will proceed without propagating the error. Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com> --- drivers/thermal/samsung/exynos_tmu.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)