summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/kmb
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2021-05-13 21:46:38 +0800
committerAnitha Chrisanthus <anitha.chrisanthus@intel.com>2021-06-22 10:33:49 -0700
commit6fd8f323b3e4e5290d02174559308669507c00dd (patch)
tree24967c045deb3276a15366532859744a25883700 /drivers/gpu/drm/kmb
parent8ddf5b9bb479570a3825d70fecfb9399bc15700c (diff)
drm/kmb: Fix error return code in kmb_hw_init()
When the call to platform_get_irq() to obtain the IRQ of the lcd fails, the returned error code should be propagated. However, we currently do not explicitly assign this error code to 'ret'. As a result, 0 was incorrectly returned. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210513134639.6541-1-thunder.leizhen@huawei.com
Diffstat (limited to 'drivers/gpu/drm/kmb')
-rw-r--r--drivers/gpu/drm/kmb/kmb_drv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/kmb/kmb_drv.c b/drivers/gpu/drm/kmb/kmb_drv.c
index f64e06e1067d..96ea1a2c11dd 100644
--- a/drivers/gpu/drm/kmb/kmb_drv.c
+++ b/drivers/gpu/drm/kmb/kmb_drv.c
@@ -137,6 +137,7 @@ static int kmb_hw_init(struct drm_device *drm, unsigned long flags)
/* Allocate LCD interrupt resources */
irq_lcd = platform_get_irq(pdev, 0);
if (irq_lcd < 0) {
+ ret = irq_lcd;
drm_err(&kmb->drm, "irq_lcd not found");
goto setup_fail;
}