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: <18278ed3-fef0-400d-8cba-72f4c573d7ee@web.de>
Date: Tue, 15 Apr 2025 12:00:33 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Johan Hovold <johan+linaro@...nel.org>, linux-sound@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>, Jaroslav Kysela <perex@...ex.cz>,
 Mark Brown <broonie@...nel.org>, Liam Girdwood <lgirdwood@...il.com>,
 Peter Rosin <peda@...ntia.se>,
 Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
 Takashi Iwai <tiwai@...e.com>
Subject: Re: [PATCH 1/2] ASoC: codecs: wcd938x: fix mux error handling

…
> +++ b/sound/soc/codecs/wcd938x.c
> @@ -3271,18 +3271,13 @@ static int wcd938x_populate_dt_data(struct wcd938x_priv *wcd938x, struct device
>  		return dev_err_probe(dev, wcd938x->reset_gpio,
>  				     "Failed to get reset gpio\n");
>  
> -	wcd938x->us_euro_mux = devm_mux_control_get(dev, NULL);
> -	if (IS_ERR(wcd938x->us_euro_mux)) {
> -		if (PTR_ERR(wcd938x->us_euro_mux) == -EPROBE_DEFER)
> -			return -EPROBE_DEFER;
> +	if (of_property_present(dev->of_node, "mux-controls")) {
> +		wcd938x->us_euro_mux = devm_mux_control_get(dev, NULL);
> +		if (IS_ERR(wcd938x->us_euro_mux)) {
> +			ret = PTR_ERR(wcd938x->us_euro_mux);
> +			return dev_err_probe(dev, ret, "failed to get mux control\n");
> +		}

May the error code assignment statement be omitted here together with extra curly brackets
(as such a case is demonstrated in a subsequent if branch)?

+			return dev_err_probe(dev, PTR_ERR(wcd938x->us_euro_mux),
+					     "failed to get mux control\n");


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ