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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120726113204.GY3099@opensource.wolfsonmicro.com>
Date:	Thu, 26 Jul 2012 12:32:04 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Lee Jones <lee.jones@...aro.org>
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	STEricsson_nomadik_linux@...t.st.com, linus.walleij@...ricsson.com,
	arnd@...db.de, sameo@...ux.intel.com, olalilja@...oo.se,
	ola.o.lilja@...ricsson.com, alsa-devel@...a-project.org, lrg@...com
Subject: Re: [PATCH 07/21] ASoC: io: Prevent use of regmap if request fails

On Thu, Jul 26, 2012 at 11:28:40AM +0100, Lee Jones wrote:

> @@ -52,10 +52,13 @@ static unsigned int hw_read(struct snd_soc_codec *codec, unsigned int reg)
>  		if (codec->cache_only)
>  			return -1;
>  
> -		ret = regmap_read(codec->control_data, reg, &val);
> -		if (ret == 0)
> -			return val;
> -		else
> +		if (codec->using_regmap) {
> +			ret = regmap_read(codec->control_data, reg, &val);
> +			if (ret == 0)
> +				return val;
> +			else
> +				return -1;
> +		} else

No, this makes no sense.  There is no non-regmap I/O support in soc-io,
anything using the soc-io hw_read() function must be using regmap.

>  	case SND_SOC_REGMAP:
>  		/* Device has made its own regmap arrangements */
> -		codec->using_regmap = true;

Again, this makes no sense.  If we're explicitly being asked to use
regmap then we should be using regmap or just failing to set up I/O
(which is obviously a catastrophic failure).

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ