All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Jiahao <chenjiahao16@huawei.com>
To: <rafael@kernel.org>, <daniel.lezcano@linaro.org>,
	<amitk@kernel.org>, <rui.zhang@intel.com>,
	<matthias.bgg@gmail.com>,
	<angelogioacchino.delregno@collabora.com>, <bchihi@baylibre.com>,
	<wenst@chromium.org>, <robh@kernel.org>, <frank.li@vivo.com>,
	<linux-pm@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>
Cc: <chenjiahao16@huawei.com>
Subject: [PATCH -next] thermal: Clean up redundant dev_err_probe()
Date: Wed, 2 Aug 2023 17:45:27 +0800	[thread overview]
Message-ID: <20230802094527.988842-1-chenjiahao16@huawei.com> (raw)

Referring to platform_get_irq()'s definition, the return value has
already been checked if ret < 0, and printed via dev_err_probe().
Calling dev_err_probe() one more time outside platform_get_irq()
is obviously redundant.

Removing dev_err_probe() outside platform_get_irq() to clean up
above problem.

Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com>
---
 drivers/thermal/mediatek/lvts_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index 054c965ae5e1..371f66e899bd 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -1138,7 +1138,7 @@ static int lvts_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-		return dev_err_probe(dev, irq, "No irq resource\n");
+		return irq;
 
 	ret = lvts_domain_init(dev, lvts_td, lvts_data);
 	if (ret)
-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Chen Jiahao <chenjiahao16@huawei.com>
To: <rafael@kernel.org>, <daniel.lezcano@linaro.org>,
	<amitk@kernel.org>, <rui.zhang@intel.com>,
	<matthias.bgg@gmail.com>,
	<angelogioacchino.delregno@collabora.com>, <bchihi@baylibre.com>,
	<wenst@chromium.org>, <robh@kernel.org>, <frank.li@vivo.com>,
	<linux-pm@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>
Cc: <chenjiahao16@huawei.com>
Subject: [PATCH -next] thermal: Clean up redundant dev_err_probe()
Date: Wed, 2 Aug 2023 17:45:27 +0800	[thread overview]
Message-ID: <20230802094527.988842-1-chenjiahao16@huawei.com> (raw)

Referring to platform_get_irq()'s definition, the return value has
already been checked if ret < 0, and printed via dev_err_probe().
Calling dev_err_probe() one more time outside platform_get_irq()
is obviously redundant.

Removing dev_err_probe() outside platform_get_irq() to clean up
above problem.

Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com>
---
 drivers/thermal/mediatek/lvts_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index 054c965ae5e1..371f66e899bd 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -1138,7 +1138,7 @@ static int lvts_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-		return dev_err_probe(dev, irq, "No irq resource\n");
+		return irq;
 
 	ret = lvts_domain_init(dev, lvts_td, lvts_data);
 	if (ret)
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2023-08-02  9:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02  9:45 Chen Jiahao [this message]
2023-08-02  9:45 ` [PATCH -next] thermal: Clean up redundant dev_err_probe() Chen Jiahao
2023-08-02 10:02 ` AngeloGioacchino Del Regno
2023-08-02 10:02   ` AngeloGioacchino Del Regno
2023-08-16 10:06 ` Daniel Lezcano
2023-08-16 10:06   ` Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230802094527.988842-1-chenjiahao16@huawei.com \
    --to=chenjiahao16@huawei.com \
    --cc=amitk@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bchihi@baylibre.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=frank.li@vivo.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=wenst@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.