mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andy@kernel.org>, Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH v1 1/2] mfd: intel_soc_pmic_chtwc: Use dev_err_probe()
Date: Mon, 20 Jun 2022 10:33:36 +0200	[thread overview]
Message-ID: <1a8e3e3a-1008-b52b-b7e9-117fd43e77d4@redhat.com> (raw)
In-Reply-To: <20220616171009.43524-1-andriy.shevchenko@linux.intel.com>

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@linux.intel.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.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)


  parent reply	other threads:[~2022-06-20  8:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16 17:10 Andy Shevchenko
2022-06-16 17:10 ` [PATCH v1 2/2] mfd: intel_soc_pmic_chtwc: Switch from __maybe_unused to pm_sleep_ptr() etc Andy Shevchenko
2022-06-20  8:38   ` Hans de Goede
2022-06-20  9:39     ` Andy Shevchenko
2022-06-20  8:48   ` Hans de Goede
2022-06-20  9:40     ` Andy Shevchenko
2022-06-27 13:05   ` Lee Jones
2022-06-20  8:33 ` Hans de Goede [this message]
2022-06-27 13:05 ` [PATCH v1 1/2] mfd: intel_soc_pmic_chtwc: Use dev_err_probe() Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a8e3e3a-1008-b52b-b7e9-117fd43e77d4@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®