From patchwork Wed Jul 17 08:55:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13735227 Return-Path: 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 62596C3DA42 for ; Wed, 17 Jul 2024 08:55:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=b1vcI/K+2KLMZuvtnOBL0GjEFEZymTOWIpsTg/FE3Xs=; b=kuivaXYO7qC9X6vKU8FHH9Ki4j SKS41vUd2tax8d8lx1nvt9xMlMli8y6WPsNpoOfAUt7UrZYMAoJW4ch1IL2HuDVXk8Q7the7kCAMF 8xx6llSJxTDJ75Kc4PsugQ1YvNj4h2F7tIk9OpmbBBRVOoJCPyVWE6ZeEfTEDmPaTxJZmcMMWLkw2 3qz26iw5NhcMHzu1eVgvo8jfm1DokBVYTfoiCBH/cSTclfP46mfmJy+9LjTEYHF8CWFleRNwIHctu hicrBQRdf5YBzAX/Nou9+P89zzN6knHq+z2c/jMTqsNrNwS3G/8ZOwNqwVGpMUNa4U/52YZFhNb5e 9rXgcdMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sU0Rs-0000000DDke-0N2X; Wed, 17 Jul 2024 08:55:44 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sU0RX-0000000DDeQ-1UR0 for linux-arm-kernel@lists.infradead.org; Wed, 17 Jul 2024 08:55:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1721206523; x=1752742523; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=b1vcI/K+2KLMZuvtnOBL0GjEFEZymTOWIpsTg/FE3Xs=; b=TEccIcr8osyYwf506ZsOU8bgdul5UrZYMueVa7cccdtb5ALYE98BLWpi CBW9+51QIFMqyM5TbN83ACrZVVk9n9DTy6hHtUdkhW2Gnv4Ll5kb/cdG9 uKmErdl+kQxg7moLyRx4du2XMMitXXxprZSRu5nsgZ5ELpQ51pIFhARVF eNr1rywjJmQIch63hDfi3mn/2O/zH0ytf5rV1IhGbA50ZjLgH3oEdtJuS oIPDULAwLAKX7UIwwHOoDBPEnW9mbylCfC1eEu/k+p1UBOlkzWlnAmBSH 81A0HZyHmJ3y+j0ZFDRaDnJeWsi7GYgCXybPy3Gvfg5JwhZjgoWbba5dc w==; X-CSE-ConnectionGUID: 4h9HXuQdSfCFkDR2+B26lw== X-CSE-MsgGUID: jmJozPOvQ4ycQ9dyeGcR1A== X-IronPort-AV: E=Sophos;i="6.09,214,1716242400"; d="scan'208";a="37946769" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 17 Jul 2024 10:55:21 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 29A37172575; Wed, 17 Jul 2024 10:55:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1721206520; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=b1vcI/K+2KLMZuvtnOBL0GjEFEZymTOWIpsTg/FE3Xs=; b=K0F8Dj8YmqBQrwiO14nwlRuOyhU1UEq2KnnpBiwXNs9esg/kV5y1fJDIMN+zJyOnQJUqwP lq590ZVhkcG4XRGKMKiFViFp/ffvM0qaF1MMHZAFkv4HJbdsHGvHV3asXIogscTuDtURME BGCXiw+/s5rp5nL8fLObfhcNh08k52I7XT9pcQEh3SwHttWFBA6vht1wVagNK17ajmMeSi dZLkHLnaw9QMRxzXSbvrim8+3JOv/YHvJOw+drx658188lADF+/tCQXYljRFbPjEN3oHHH SSOYv3qQSKvfHE56AwmLIZXjtNQUhrACS9pHRpj82FRz46r+CWhaogdaqYqL6g== From: Alexander Stein To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Alexander Stein , linux-pm@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] thermal/drivers/imx_sc_thermal: Use dev_err_probe Date: Wed, 17 Jul 2024 10:55:16 +0200 Message-Id: <20240717085517.3333385-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240717_015523_913036_7932DAB5 X-CRM114-Status: UNSURE ( 9.54 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This adds the error code to the error message and also stores that message in case of probe deferral. Signed-off-by: Alexander Stein --- drivers/thermal/imx_sc_thermal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c index 7224f8d21db97..88558ce588807 100644 --- a/drivers/thermal/imx_sc_thermal.c +++ b/drivers/thermal/imx_sc_thermal.c @@ -111,8 +111,7 @@ static int imx_sc_thermal_probe(struct platform_device *pdev) if (ret == -ENODEV) continue; - dev_err(&pdev->dev, "failed to register thermal zone\n"); - return ret; + return dev_err_probe(&pdev->dev, ret, "failed to register thermal zone\n"); } devm_thermal_add_hwmon_sysfs(&pdev->dev, sensor->tzd);