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]
Message-ID: <b1d1f523-6852-4877-be73-85cb6728d9a8@kernel.org>
Date: Fri, 30 Aug 2024 19:14:12 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Yang Ruibin <11162571@...o.com>, Lars-Peter Clausen <lars@...afoo.de>,
 Nuno Sá <nuno.sa@...log.com>,
 Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
 Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
 alsa-devel@...a-project.org, linux-sound@...r.kernel.org,
 linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com
Subject: Re: [PATCH v1] ASoC: codecs: Switch to use dev_err_probe()

On 30/08/2024 03:47, Yang Ruibin wrote:
> Using dev_err_probe() instead of dev_err() in probe() simplifies
> the error path and standardizes the format of the error code.
> 
> Signed-off-by: Yang Ruibin <11162571@...o.com>
> ---
>  sound/soc/codecs/ad1980.c   |  8 +++-----
>  sound/soc/codecs/adau1701.c | 19 +++++++------------
>  sound/soc/codecs/ssm2602.c  |  6 ++----
>  3 files changed, 12 insertions(+), 21 deletions(-)
> 

...

> diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c
> index c29324403..153eb55a3 100644
> --- a/sound/soc/codecs/ssm2602.c
> +++ b/sound/soc/codecs/ssm2602.c
> @@ -605,10 +605,8 @@ static int ssm260x_component_probe(struct snd_soc_component *component)
>  	int ret;
>  
>  	ret = regmap_write(ssm2602->regmap, SSM2602_RESET, 0);
> -	if (ret < 0) {
> -		dev_err(component->dev, "Failed to issue reset: %d\n", ret);
> -		return ret;
> -	}
> +	if (ret < 0)
> +		return dev_err_probe(component->dev, ret, "Failed to issue reset\n");

After quick look, I think this might not be a probe path, thus the code
might not be correct.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ