mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
	linux-pm@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	Anton Vorontsov <anton.vorontsov@linaro.org>,
	Milo Kim <milo.kim@ti.com>, Sebastian Reichel <sre@kernel.org>
Subject: Re: [PATCH] power: supply: lp8788: Fix an error handling path in lp8788_charger_probe()
Date: Fri, 8 May 2020 13:25:19 +0200	[thread overview]
Message-ID: <ccb359c1-b157-6d41-5fd2-791a368d7cf5@web.de> (raw)

> In case of error, resources allocated in 'lp8788_setup_adc_channel()' must
> be released.
>
> Add a call to 'lp8788_release_adc_channel()' as already done in the remove
> function.

I suggest to omit apostrophes from this commit message.


…
> +++ b/drivers/power/supply/lp8788-charger.c
> @@ -719,13 +719,17 @@  static int lp8788_charger_probe(struct platform_device *pdev)
>
>  	ret = lp8788_psy_register(pdev, pchg);
>  	if (ret)
> -		return ret;
> +		goto err_release_adc_channel;
>
>  	ret = lp8788_irq_register(pdev, pchg);
…

You propose to perform another channel release only once for this
function implementation.
Thus I find nicer to specify the desired exception handling in
this if branch directly.

Regards,
Markus

             reply	other threads:[~2020-05-08 11:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 11:25 Markus Elfring [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-05-08  7:11 [PATCH] power: supply: lp8788: Fix an error handling path in 'lp8788_charger_probe()' Christophe JAILLET
2020-05-09  0:14 ` Sebastian Reichel

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=ccb359c1-b157-6d41-5fd2-791a368d7cf5@web.de \
    --to=markus.elfring@web.de \
    --cc=anton.vorontsov@linaro.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=milo.kim@ti.com \
    --cc=sre@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®