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: <1a8e3e3a-1008-b52b-b7e9-117fd43e77d4@redhat.com>
Date:   Mon, 20 Jun 2022 10:33:36 +0200
From:   Hans de Goede <hdegoede@...hat.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-kernel@...r.kernel.org
Cc:     Andy Shevchenko <andy@...nel.org>, Lee Jones <lee.jones@...aro.org>
Subject: Re: [PATCH v1 1/2] mfd: intel_soc_pmic_chtwc: Use dev_err_probe()

Hi,

On 6/16/22 19:10, Andy Shevchenko wrote:
> Simplify the mux error path a bit by using dev_err_probe().
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@...hat.com>

Regards,

Hans


> ---
>  drivers/mfd/intel_soc_pmic_chtwc.c | 19 +++++++------------
>  1 file changed, 7 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/mfd/intel_soc_pmic_chtwc.c b/drivers/mfd/intel_soc_pmic_chtwc.c
> index 4eab191e053a..1cbe2bcce530 100644
> --- a/drivers/mfd/intel_soc_pmic_chtwc.c
> +++ b/drivers/mfd/intel_soc_pmic_chtwc.c
> @@ -179,18 +179,13 @@ static int cht_wc_probe(struct i2c_client *client)
>  	int ret;
>  
>  	status = acpi_evaluate_integer(ACPI_HANDLE(dev), "_HRV", NULL, &hrv);
> -	if (ACPI_FAILURE(status)) {
> -		dev_err(dev, "Failed to get PMIC hardware revision\n");
> -		return -ENODEV;
> -	}
> -	if (hrv != CHT_WC_HRV) {
> -		dev_err(dev, "Invalid PMIC hardware revision: %llu\n", hrv);
> -		return -ENODEV;
> -	}
> -	if (client->irq < 0) {
> -		dev_err(dev, "Invalid IRQ\n");
> -		return -EINVAL;
> -	}
> +	if (ACPI_FAILURE(status))
> +		return dev_err_probe(dev, -ENODEV, "Failed to get PMIC hardware revision\n");
> +	if (hrv != CHT_WC_HRV)
> +		return dev_err_probe(dev, -ENODEV, "Invalid PMIC hardware revision: %llu\n", hrv);
> +
> +	if (client->irq < 0)
> +		return dev_err_probe(dev, -EINVAL, "Invalid IRQ\n");
>  
>  	pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL);
>  	if (!pmic)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ