Re: [PATCH -next] media: platform: ti: fix the return value handle for platform_get_irq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 03, 2023 at 12:04:44AM +0300, Laurent Pinchart wrote:
> Hi Ruan,
> 
> Thank you for the patch.
> 
> On Mon, Jul 31, 2023 at 08:02:12PM +0800, Ruan Jinjie wrote:
> > There is no possible for platform_get_irq() to return 0,
> > and the return value of platform_get_irq() is more sensible
> > to show the error reason.
> > 
> > Signed-off-by: Ruan Jinjie <ruanjinjie@xxxxxxxxxx>
> > ---
> >  drivers/media/platform/ti/am437x/am437x-vpfe.c | 4 +---
> >  drivers/media/platform/ti/omap3isp/isp.c       | 4 +---
> >  2 files changed, 2 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/media/platform/ti/am437x/am437x-vpfe.c b/drivers/media/platform/ti/am437x/am437x-vpfe.c
> > index 81a63a3865cf..a85b97107de7 100644
> > --- a/drivers/media/platform/ti/am437x/am437x-vpfe.c
> > +++ b/drivers/media/platform/ti/am437x/am437x-vpfe.c
> > @@ -2420,10 +2420,8 @@ static int vpfe_probe(struct platform_device *pdev)
> >  	}
> >  
> >  	ret = platform_get_irq(pdev, 0);
> > -	if (ret <= 0) {
> > -		ret = -ENODEV;
> > +	if (ret < 0)
> >  		goto probe_out_cleanup;
> > -	}
> >  	vpfe->irq = ret;
> >  
> >  	ret = devm_request_irq(vpfe->pdev, vpfe->irq, vpfe_isr, 0,
> > diff --git a/drivers/media/platform/ti/omap3isp/isp.c b/drivers/media/platform/ti/omap3isp/isp.c
> > index f3aaa9e76492..226db75221cd 100644
> > --- a/drivers/media/platform/ti/omap3isp/isp.c
> > +++ b/drivers/media/platform/ti/omap3isp/isp.c
> > @@ -2398,10 +2398,8 @@ static int isp_probe(struct platform_device *pdev)
> >  
> >  	/* Interrupt */
> >  	ret = platform_get_irq(pdev, 0);
> > -	if (ret <= 0) {
> > -		ret = -ENODEV;
> > +	if (ret < 0)
> >  		goto error_iommu;
> > -	}
> >  	isp->irq_num = ret;
> >  
> >  	if (devm_request_irq(isp->dev, isp->irq_num, isp_isr, IRQF_SHARED,
> 
> The changes look fine to me.
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> 
> Sakari, would you like to merge this through your tree ?

Done, thanks. I'll push it this afternoon to my git.linuxtv.org tree.

-- 
Sakari Ailus



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux