lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 8 Apr 2024 15:50:08 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Mark Brown <broonie@...nel.org>
Cc: Richard Fitzgerald <rf@...nsource.cirrus.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
	linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] ASoC: soc-card: Fix a reversed if condition

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ