From: Ruan Jinjie <ruanjinjie@huawei.com>
To: <j-keerthy@ti.com>, <linus.walleij@linaro.org>, <brgl@bgdev.pl>,
<andy@kernel.org>, <grygorii.strashko@ti.com>,
<ssantosh@kernel.org>, <khilman@kernel.org>,
<linux-gpio@vger.kernel.org>, <linux-omap@vger.kernel.org>
Cc: <ruanjinjie@huawei.com>
Subject: [PATCH -next] gpio: Remove redundant dev_err_probe()
Date: Thu, 27 Jul 2023 17:14:46 +0800 [thread overview]
Message-ID: <20230727091446.859984-1-ruanjinjie@huawei.com> (raw)
There is no need to call the dev_err_probe() function directly to print
a custom message when handling an error from platform_get_irq() function as
it is going to display an appropriate error message in case of a failure.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
drivers/gpio/gpio-davinci.c | 2 +-
drivers/gpio/gpio-omap.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index fff510d86e31..8db5717bdabe 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -236,7 +236,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
for (i = 0; i < nirq; i++) {
chips->irqs[i] = platform_get_irq(pdev, i);
if (chips->irqs[i] < 0)
- return dev_err_probe(dev, chips->irqs[i], "IRQ not populated\n");
+ return chips->irqs[i];
}
chips->chip.label = dev_name(dev);
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 2b78fde74e30..21c8cfedfd64 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1415,7 +1415,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
if (bank->irq <= 0) {
if (!bank->irq)
bank->irq = -ENXIO;
- return dev_err_probe(dev, bank->irq, "can't get irq resource\n");
+ return bank->irq;
}
bank->chip.parent = dev;
--
2.34.1
next reply other threads:[~2023-07-27 9:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 9:14 Ruan Jinjie [this message]
2023-07-27 10:11 ` [PATCH -next] gpio: Remove redundant dev_err_probe() Andy Shevchenko
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=20230727091446.859984-1-ruanjinjie@huawei.com \
--to=ruanjinjie@huawei.com \
--cc=andy@kernel.org \
--cc=brgl@bgdev.pl \
--cc=grygorii.strashko@ti.com \
--cc=j-keerthy@ti.com \
--cc=khilman@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=ssantosh@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.