Commit dac78378 authored by Ruan Jinjie's avatar Ruan Jinjie Committed by Alexandre Belloni

rtc: tps65910: Remove redundant dev_warn() and do not check for 0 return after...

rtc: tps65910: Remove redundant dev_warn() and do not check for 0 return after calling platform_get_irq()

It is not possible for platform_get_irq() to return 0. Use the
return value from platform_get_irq().

And there is no need to call the dev_warn() 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: default avatarRuan Jinjie <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230803080713.4061782-3-ruanjinjie@huawei.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 4d349a57
...@@ -406,11 +406,8 @@ static int tps65910_rtc_probe(struct platform_device *pdev) ...@@ -406,11 +406,8 @@ static int tps65910_rtc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, tps_rtc); platform_set_drvdata(pdev, tps_rtc);
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq <= 0) { if (irq < 0)
dev_warn(&pdev->dev, "Wake up is not possible as irq = %d\n", return irq;
irq);
return -ENXIO;
}
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
tps65910_rtc_interrupt, IRQF_TRIGGER_LOW, tps65910_rtc_interrupt, IRQF_TRIGGER_LOW,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment