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
| ||
|
Message-ID: <e02bc48e-58dd-44d6-ae89-a6a2936df778@wanadoo.fr> Date: Sun, 10 Dec 2023 07:55:02 +0100 From: Christophe JAILLET <christophe.jaillet@...adoo.fr> To: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>, Sebastien Bourdelin <sebastien.bourdelin@...oirfairelinux.com>, Arnd Bergmann <arnd@...db.de> Cc: linux-kernel@...r.kernel.org, kernel@...gutronix.de Subject: Re: [PATCH 2/2] bus: ts-nbus: Improve error reporting Le 09/12/2023 à 23:35, Uwe Kleine-König a écrit : > Using dev_err_probe() brings several improvements: > > - emits the symbolic error code > - properly handles EPROBE_DEFER > - combines error message generation and return value handling > > While at it add error messages to two error paths that were silent > before. > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de> > --- > drivers/bus/ts-nbus.c | 65 ++++++++++++++++++------------------------- > 1 file changed, 27 insertions(+), 38 deletions(-) > > diff --git a/drivers/bus/ts-nbus.c b/drivers/bus/ts-nbus.c ... > @@ -289,25 +283,19 @@ static int ts_nbus_probe(struct platform_device *pdev) > return ret; > > pwm = devm_pwm_get(dev, NULL); > - if (IS_ERR(pwm)) { > - ret = PTR_ERR(pwm); > - if (ret != -EPROBE_DEFER) > - dev_err(dev, "unable to request PWM\n"); > - return ret; > - } > + if (IS_ERR(pwm)) > + return dev_err_probe(dev, ret, "unable to request PWM\n"); s/ret/PTR_ERR(pwm)/ CJ
Powered by blists - more mailing lists