* [PATCH 1/1] drm/kmb: Fix error return code in kmb_hw_init()
@ 2021-05-13 13:46 Zhen Lei
2021-05-13 17:12 ` Chrisanthus, Anitha
0 siblings, 1 reply; 3+ messages in thread
From: Zhen Lei @ 2021-05-13 13:46 UTC (permalink / raw)
To: Anitha Chrisanthus, Edmund Dea, David Airlie, Daniel Vetter,
Sam Ravnborg, dri-devel
Cc: Zhen Lei
When call 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>
---
drivers/gpu/drm/kmb/kmb_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/kmb/kmb_drv.c b/drivers/gpu/drm/kmb/kmb_drv.c
index f64e06e1067dd8d..96ea1a2c11dd6a3 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;
}
--
2.26.0.106.g9fadedd
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH 1/1] drm/kmb: Fix error return code in kmb_hw_init()
2021-05-13 13:46 [PATCH 1/1] drm/kmb: Fix error return code in kmb_hw_init() Zhen Lei
@ 2021-05-13 17:12 ` Chrisanthus, Anitha
2021-06-22 17:46 ` Chrisanthus, Anitha
0 siblings, 1 reply; 3+ messages in thread
From: Chrisanthus, Anitha @ 2021-05-13 17:12 UTC (permalink / raw)
To: Zhen Lei, Dea, Edmund J, David Airlie, Daniel Vetter,
Sam Ravnborg, dri-devel
Thanks for the patch.
Reviewed-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
> -----Original Message-----
> From: Zhen Lei <thunder.leizhen@huawei.com>
> Sent: Thursday, May 13, 2021 6:47 AM
> To: Chrisanthus, Anitha <anitha.chrisanthus@intel.com>; Dea, Edmund J
> <edmund.j.dea@intel.com>; David Airlie <airlied@linux.ie>; Daniel Vetter
> <daniel@ffwll.ch>; Sam Ravnborg <sam@ravnborg.org>; dri-devel <dri-
> devel@lists.freedesktop.org>
> Cc: Zhen Lei <thunder.leizhen@huawei.com>
> Subject: [PATCH 1/1] drm/kmb: Fix error return code in kmb_hw_init()
>
> When call 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>
> ---
> drivers/gpu/drm/kmb/kmb_drv.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/kmb/kmb_drv.c
> b/drivers/gpu/drm/kmb/kmb_drv.c
> index f64e06e1067dd8d..96ea1a2c11dd6a3 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;
> }
> --
> 2.26.0.106.g9fadedd
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH 1/1] drm/kmb: Fix error return code in kmb_hw_init()
2021-05-13 17:12 ` Chrisanthus, Anitha
@ 2021-06-22 17:46 ` Chrisanthus, Anitha
0 siblings, 0 replies; 3+ messages in thread
From: Chrisanthus, Anitha @ 2021-06-22 17:46 UTC (permalink / raw)
To: Zhen Lei, Dea, Edmund J, David Airlie, Daniel Vetter,
Sam Ravnborg, dri-devel
Thanks for the patch. Patch pushed to drm-misc-fixes.
Anitha
> -----Original Message-----
> From: Chrisanthus, Anitha
> Sent: Thursday, May 13, 2021 10:12 AM
> To: Zhen Lei <thunder.leizhen@huawei.com>; Dea, Edmund J
> <edmund.j.dea@intel.com>; David Airlie <airlied@linux.ie>; Daniel Vetter
> <daniel@ffwll.ch>; Sam Ravnborg <sam@ravnborg.org>; dri-devel <dri-
> devel@lists.freedesktop.org>
> Subject: RE: [PATCH 1/1] drm/kmb: Fix error return code in kmb_hw_init()
>
> Thanks for the patch.
>
> Reviewed-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
>
> > -----Original Message-----
> > From: Zhen Lei <thunder.leizhen@huawei.com>
> > Sent: Thursday, May 13, 2021 6:47 AM
> > To: Chrisanthus, Anitha <anitha.chrisanthus@intel.com>; Dea, Edmund J
> > <edmund.j.dea@intel.com>; David Airlie <airlied@linux.ie>; Daniel Vetter
> > <daniel@ffwll.ch>; Sam Ravnborg <sam@ravnborg.org>; dri-devel <dri-
> > devel@lists.freedesktop.org>
> > Cc: Zhen Lei <thunder.leizhen@huawei.com>
> > Subject: [PATCH 1/1] drm/kmb: Fix error return code in kmb_hw_init()
> >
> > When call 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>
> > ---
> > drivers/gpu/drm/kmb/kmb_drv.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/kmb/kmb_drv.c
> > b/drivers/gpu/drm/kmb/kmb_drv.c
> > index f64e06e1067dd8d..96ea1a2c11dd6a3 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;
> > }
> > --
> > 2.26.0.106.g9fadedd
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-22 17:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 13:46 [PATCH 1/1] drm/kmb: Fix error return code in kmb_hw_init() Zhen Lei
2021-05-13 17:12 ` Chrisanthus, Anitha
2021-06-22 17:46 ` Chrisanthus, Anitha
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).