All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Jiahao <chenjiahao16@huawei.com>
To: <andi.shyti@kernel.org>, <broonie@kernel.org>,
	<krzysztof.kozlowski@linaro.org>, <alim.akhtar@samsung.com>,
	<linux-spi@vger.kernel.org>, <linux-samsung-soc@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Cc: <chenjiahao16@huawei.com>
Subject: [PATCH -next] spi: s3c64xx: Clean up redundant dev_err_probe()
Date: Thu, 27 Jul 2023 21:16:35 +0800	[thread overview]
Message-ID: <20230727131635.2898051-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/spi/spi-s3c64xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index a1b68fdc205d..bf7cb18be9dc 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1167,7 +1167,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-		return dev_err_probe(&pdev->dev, irq, "Failed to get IRQ\n");
+		return irq;
 
 	master = devm_spi_alloc_master(&pdev->dev, sizeof(*sdd));
 	if (!master)
-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Chen Jiahao <chenjiahao16@huawei.com>
To: <andi.shyti@kernel.org>, <broonie@kernel.org>,
	<krzysztof.kozlowski@linaro.org>, <alim.akhtar@samsung.com>,
	<linux-spi@vger.kernel.org>, <linux-samsung-soc@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Cc: <chenjiahao16@huawei.com>
Subject: [PATCH -next] spi: s3c64xx: Clean up redundant dev_err_probe()
Date: Thu, 27 Jul 2023 21:16:35 +0800	[thread overview]
Message-ID: <20230727131635.2898051-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/spi/spi-s3c64xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index a1b68fdc205d..bf7cb18be9dc 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1167,7 +1167,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-		return dev_err_probe(&pdev->dev, irq, "Failed to get IRQ\n");
+		return irq;
 
 	master = devm_spi_alloc_master(&pdev->dev, sizeof(*sdd));
 	if (!master)
-- 
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-07-27 13:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 13:16 Chen Jiahao [this message]
2023-07-27 13:16 ` [PATCH -next] spi: s3c64xx: Clean up redundant dev_err_probe() Chen Jiahao
2023-07-27 13:30 ` Andi Shyti
2023-07-27 13:30   ` Andi Shyti
2023-07-27 19:32 ` Mark Brown
2023-07-27 19:32   ` Mark Brown

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=20230727131635.2898051-1-chenjiahao16@huawei.com \
    --to=chenjiahao16@huawei.com \
    --cc=alim.akhtar@samsung.com \
    --cc=andi.shyti@kernel.org \
    --cc=broonie@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.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.