* [PATCH] i2c: altera: Remove superfluous error message in altr_i2c_probe()
@ 2020-05-03 12:48 Aishwarya Ramakrishnan
2020-05-04 14:10 ` Thor Thayer
0 siblings, 1 reply; 2+ messages in thread
From: Aishwarya Ramakrishnan @ 2020-05-03 12:48 UTC (permalink / raw)
To: Thor Thayer, linux-i2c, linux-kernel; +Cc: aishwaryarj100
The function platform_get_irq can log an error by itself.
This omit a redundant message for exception handling in the
calling function.
Suggested by Coccinelle.
Signed-off-by: Aishwarya Ramakrishnan <aishwaryarj100@gmail.com>
---
drivers/i2c/busses/i2c-altera.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-altera.c b/drivers/i2c/busses/i2c-altera.c
index f5c00f903df3..af6985f0ae63 100644
--- a/drivers/i2c/busses/i2c-altera.c
+++ b/drivers/i2c/busses/i2c-altera.c
@@ -395,10 +395,8 @@ static int altr_i2c_probe(struct platform_device *pdev)
return PTR_ERR(idev->base);
irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(&pdev->dev, "missing interrupt resource\n");
+ if (irq < 0)
return irq;
- }
idev->i2c_clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(idev->i2c_clk)) {
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] i2c: altera: Remove superfluous error message in altr_i2c_probe()
2020-05-03 12:48 [PATCH] i2c: altera: Remove superfluous error message in altr_i2c_probe() Aishwarya Ramakrishnan
@ 2020-05-04 14:10 ` Thor Thayer
0 siblings, 0 replies; 2+ messages in thread
From: Thor Thayer @ 2020-05-04 14:10 UTC (permalink / raw)
To: Aishwarya Ramakrishnan, linux-i2c, linux-kernel
On 5/3/20 7:48 AM, Aishwarya Ramakrishnan wrote:
> The function platform_get_irq can log an error by itself.
> This omit a redundant message for exception handling in the
> calling function.
>
> Suggested by Coccinelle.
>
> Signed-off-by: Aishwarya Ramakrishnan <aishwaryarj100@gmail.com>
> ---
> drivers/i2c/busses/i2c-altera.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-altera.c b/drivers/i2c/busses/i2c-altera.c
> index f5c00f903df3..af6985f0ae63 100644
> --- a/drivers/i2c/busses/i2c-altera.c
> +++ b/drivers/i2c/busses/i2c-altera.c
> @@ -395,10 +395,8 @@ static int altr_i2c_probe(struct platform_device *pdev)
> return PTR_ERR(idev->base);
>
> irq = platform_get_irq(pdev, 0);
> - if (irq < 0) {
> - dev_err(&pdev->dev, "missing interrupt resource\n");
> + if (irq < 0)
> return irq;
> - }
>
> idev->i2c_clk = devm_clk_get(&pdev->dev, NULL);
> if (IS_ERR(idev->i2c_clk)) {
>
Reviewed-by: Thor Thayer <thor.thayer@linux.intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-04 14:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03 12:48 [PATCH] i2c: altera: Remove superfluous error message in altr_i2c_probe() Aishwarya Ramakrishnan
2020-05-04 14:10 ` Thor Thayer
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®