Re: [PATCH] ASoC: soc-card: Fix a reversed if condition

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

 



On Mon, Apr 08, 2024 at 01:43:09PM +0100, Mark Brown wrote:
> On Mon, Apr 08, 2024 at 10:38:02AM +0300, Dan Carpenter wrote:
> 
> >  	ret = snd_soc_register_card(priv->card);
> > -	if (!ret)
> > +	if (ret)
> >  		return ret;
> >  
> >  	return 0;
> 
> Clearly a better fix here would just be to remove the conditional
> entirely.

Hm...  Actually, it should be:

	if (ret) {
		put_device(priv->card_dev);
		return ret;
	}

	return 0;

Let me resend with that instead.

regards,
dan carpenter




[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