summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sti/sti_hdmi.c
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-11-17 16:06:06 +0530
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>2017-11-21 09:41:49 +0100
commitc83ecfa5851f4d35be88f32dabb3a53f51cf5c32 (patch)
tree19a7acd245d18fe9439b71d7e653d02810ff500a /drivers/gpu/drm/sti/sti_hdmi.c
parentcb20dd170d6a7d41e0f347998771b0e0db183438 (diff)
downloadlinux-c83ecfa5851f4d35be88f32dabb3a53f51cf5c32.tar.bz2
drm/sti: Handle return value of platform_get_irq_byname
platform_get_irq_byname() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/f4b4f1b2cfa5e302ef7ffad4e3efb0d3147709d3.1510914877.git.arvind.yadav.cs@gmail.com
Diffstat (limited to 'drivers/gpu/drm/sti/sti_hdmi.c')
-rw-r--r--drivers/gpu/drm/sti/sti_hdmi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
index d1902750a85d..1c7423f4d423 100644
--- a/drivers/gpu/drm/sti/sti_hdmi.c
+++ b/drivers/gpu/drm/sti/sti_hdmi.c
@@ -1413,6 +1413,11 @@ static int sti_hdmi_probe(struct platform_device *pdev)
init_waitqueue_head(&hdmi->wait_event);
hdmi->irq = platform_get_irq_byname(pdev, "irq");
+ if (hdmi->irq < 0) {
+ DRM_ERROR("Cannot get HDMI irq\n");
+ ret = hdmi->irq;
+ goto release_adapter;
+ }
ret = devm_request_threaded_irq(dev, hdmi->irq, hdmi_irq,
hdmi_irq_thread, IRQF_ONESHOT, dev_name(dev), hdmi);