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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB3PR0402MB391689D2F31A63C720291456F53E0@DB3PR0402MB3916.eurprd04.prod.outlook.com>
Date:   Thu, 17 Sep 2020 06:37:39 +0000
From:   Anson Huang <anson.huang@....com>
To:     "thierry.reding@...il.com" <thierry.reding@...il.com>,
        "u.kleine-koenig@...gutronix.de" <u.kleine-koenig@...gutronix.de>,
        "lee.jones@...aro.org" <lee.jones@...aro.org>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "festevam@...il.com" <festevam@...il.com>,
        "linux-pwm@...r.kernel.org" <linux-pwm@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH V2 1/3] pwm: imx-tpm: Use dev_err_probe() to simplify
 error handling

Gentle ping...

> Subject: [PATCH V2 1/3] pwm: imx-tpm: Use dev_err_probe() to simplify error
> handling
> 
> dev_err_probe() can reduce code size, uniform error handling and record the
> defer probe reason etc., use it to simplify the code.
> 
> Signed-off-by: Anson Huang <Anson.Huang@....com>
> ---
> changes since V1:
> 	- remove redundant return value print.
> ---
>  drivers/pwm/pwm-imx-tpm.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-imx-tpm.c b/drivers/pwm/pwm-imx-tpm.c index
> fcdf6be..aaf629b 100644
> --- a/drivers/pwm/pwm-imx-tpm.c
> +++ b/drivers/pwm/pwm-imx-tpm.c
> @@ -350,13 +350,9 @@ static int pwm_imx_tpm_probe(struct
> platform_device *pdev)
>  		return PTR_ERR(tpm->base);
> 
>  	tpm->clk = devm_clk_get(&pdev->dev, NULL);
> -	if (IS_ERR(tpm->clk)) {
> -		ret = PTR_ERR(tpm->clk);
> -		if (ret != -EPROBE_DEFER)
> -			dev_err(&pdev->dev,
> -				"failed to get PWM clock: %d\n", ret);
> -		return ret;
> -	}
> +	if (IS_ERR(tpm->clk))
> +		return dev_err_probe(&pdev->dev, PTR_ERR(tpm->clk),
> +				     "failed to get PWM clock\n");
> 
>  	ret = clk_prepare_enable(tpm->clk);
>  	if (ret) {
> --
> 2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ