diff options
author | Eric Anholt <eric@anholt.net> | 2019-03-08 20:43:35 +0300 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2019-03-09 02:09:42 +0300 |
commit | fc22771547e7e8a63679f0218e943d72b107de65 (patch) | |
tree | 7bec9079d9dacd0d2d340c2d55b29ee0f2c4bd9e /drivers/gpu/drm/v3d/v3d_irq.c | |
parent | 935f3d88434b564985bb5f7457852f8d7a21752a (diff) | |
download | linux-fc22771547e7e8a63679f0218e943d72b107de65.tar.xz |
drm/v3d: Handle errors from IRQ setup.
Noted in review by Dave Emett for V3D 4.2 support.
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190308174336.7866-1-eric@anholt.net
Reviewed-by: Dave Emett <david.emett@broadcom.com>
Diffstat (limited to 'drivers/gpu/drm/v3d/v3d_irq.c')
-rw-r--r-- | drivers/gpu/drm/v3d/v3d_irq.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_irq.c b/drivers/gpu/drm/v3d/v3d_irq.c index 69338da70ddc..29d746cfce57 100644 --- a/drivers/gpu/drm/v3d/v3d_irq.c +++ b/drivers/gpu/drm/v3d/v3d_irq.c @@ -156,7 +156,7 @@ v3d_hub_irq(int irq, void *arg) return status; } -void +int v3d_irq_init(struct v3d_dev *v3d) { int ret, core; @@ -173,13 +173,22 @@ v3d_irq_init(struct v3d_dev *v3d) ret = devm_request_irq(v3d->dev, platform_get_irq(v3d->pdev, 0), v3d_hub_irq, IRQF_SHARED, "v3d_hub", v3d); + if (ret) + goto fail; + ret = devm_request_irq(v3d->dev, platform_get_irq(v3d->pdev, 1), v3d_irq, IRQF_SHARED, "v3d_core0", v3d); if (ret) - dev_err(v3d->dev, "IRQ setup failed: %d\n", ret); + goto fail; v3d_irq_enable(v3d); + return 0; + +fail: + if (ret != -EPROBE_DEFER) + dev_err(v3d->dev, "IRQ setup failed: %d\n", ret); + return ret; } void |