* [PATCH v2 -next] misc: hi6421-spmi-pmic: Remove redundant dev_err()
@ 2023-07-26 18:07 Ruan Jinjie
2023-08-04 1:14 ` Ruan Jinjie
0 siblings, 1 reply; 2+ messages in thread
From: Ruan Jinjie @ 2023-07-26 18:07 UTC (permalink / raw)
To: arnd, gregkh, linux-kernel; +Cc: ruanjinjie
There is no need to call the dev_err() function directly to print a custom
message when handling an error from the 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>
---
v2:
- fix the coding style errors
---
drivers/misc/hi6421v600-irq.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/misc/hi6421v600-irq.c b/drivers/misc/hi6421v600-irq.c
index caa3de37698b..b075d803a2c2 100644
--- a/drivers/misc/hi6421v600-irq.c
+++ b/drivers/misc/hi6421v600-irq.c
@@ -244,10 +244,8 @@ static int hi6421v600_irq_probe(struct platform_device *pdev)
pmic_pdev = container_of(pmic_dev, struct platform_device, dev);
priv->irq = platform_get_irq(pmic_pdev, 0);
- if (priv->irq < 0) {
- dev_err(dev, "Error %d when getting IRQs\n", priv->irq);
+ if (priv->irq < 0)
return priv->irq;
- }
platform_set_drvdata(pdev, priv);
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v2 -next] misc: hi6421-spmi-pmic: Remove redundant dev_err()
2023-07-26 18:07 [PATCH v2 -next] misc: hi6421-spmi-pmic: Remove redundant dev_err() Ruan Jinjie
@ 2023-08-04 1:14 ` Ruan Jinjie
0 siblings, 0 replies; 2+ messages in thread
From: Ruan Jinjie @ 2023-08-04 1:14 UTC (permalink / raw)
To: arnd, gregkh, linux-kernel
Ping.
On 2023/7/27 2:07, Ruan Jinjie wrote:
> There is no need to call the dev_err() function directly to print a custom
> message when handling an error from the 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>
> ---
> v2:
> - fix the coding style errors
> ---
> drivers/misc/hi6421v600-irq.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/misc/hi6421v600-irq.c b/drivers/misc/hi6421v600-irq.c
> index caa3de37698b..b075d803a2c2 100644
> --- a/drivers/misc/hi6421v600-irq.c
> +++ b/drivers/misc/hi6421v600-irq.c
> @@ -244,10 +244,8 @@ static int hi6421v600_irq_probe(struct platform_device *pdev)
> pmic_pdev = container_of(pmic_dev, struct platform_device, dev);
>
> priv->irq = platform_get_irq(pmic_pdev, 0);
> - if (priv->irq < 0) {
> - dev_err(dev, "Error %d when getting IRQs\n", priv->irq);
> + if (priv->irq < 0)
> return priv->irq;
> - }
>
> platform_set_drvdata(pdev, priv);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-04 1:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26 18:07 [PATCH v2 -next] misc: hi6421-spmi-pmic: Remove redundant dev_err() Ruan Jinjie
2023-08-04 1:14 ` Ruan Jinjie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®