* [PATCH v1 1/1] fbdev: omapfb: Do not shadow error code from platform_get_irq()
@ 2023-10-18 3:37 Andy Shevchenko
0 siblings, 0 replies; only message in thread
From: Andy Shevchenko @ 2023-10-18 3:37 UTC (permalink / raw)
To: Helge Deller, linux-fbdev, linux-omap, dri-devel, linux-kernel
Cc: Dan Carpenter, Andy Shevchenko
There is no point in shadowing the error codes from platform_get_irq().
Refactor omapfb_do_probe() accordingly.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/video/fbdev/omap/omapfb_main.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index 42c96f1cfc93..631076bf71f9 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1643,17 +1643,16 @@ static int omapfb_do_probe(struct platform_device *pdev,
r = -ENOMEM;
goto cleanup;
}
- fbdev->int_irq = platform_get_irq(pdev, 0);
- if (fbdev->int_irq < 0) {
- r = -ENXIO;
+
+ r = platform_get_irq(pdev, 0);
+ if (r < 0)
goto cleanup;
- }
+ fbdev->int_irq = r;
- fbdev->ext_irq = platform_get_irq(pdev, 1);
- if (fbdev->ext_irq < 0) {
- r = -ENXIO;
+ r = platform_get_irq(pdev, 1);
+ if (r < 0)
goto cleanup;
- }
+ fbdev->ext_irq = r;
init_state++;
--
2.40.0.1.gaa8946217a0b
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-18 3:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-18 3:37 [PATCH v1 1/1] fbdev: omapfb: Do not shadow error code from platform_get_irq() Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).