Re: [alsa-devel] [PATCH 1/2] ASoC: nuc900: Fix platform_get_irq() error checking some more

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

 



On Sat, Dec 09, 2017 at 06:27:32PM +0100, Alexandre Belloni wrote:
> > > diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c
> > > index 5e4fbd2d3479..71fce7c85c93 100644
> > > --- a/sound/soc/nuc900/nuc900-ac97.c
> > > +++ b/sound/soc/nuc900/nuc900-ac97.c
> > > @@ -345,11 +345,10 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev)
> > >   		goto out;
> > >   	}
> > > -	nuc900_audio->irq_num = platform_get_irq(pdev, 0);
> > > -	if (nuc900_audio->irq_num <= 0) {
> > > -		ret = nuc900_audio->irq_num < 0 ? nuc900_audio->irq_num : -EBUSY;
> > > +	ret = platform_get_irq(pdev, 0);
> > > +	if (ret < 0)
> 
> The <= 0 was ok, see:
> https://lkml.org/lkml/2017/11/18/41
> 

Yeah, but is it ever going to return 0?  That seems like a design error
and also really crap commenting if so.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux