Linux Power Management development
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/2] power: supply: ab8500_charger: Fix an error handling path
Date: Fri, 1 Dec 2017 16:29:43 +0100	[thread overview]
Message-ID: <20171201152943.ckzvhph45kj76blr@earth> (raw)
In-Reply-To: <20171122202731.13414-1-christophe.jaillet@wanadoo.fr>

[-- Attachment #1: Type: text/plain, Size: 1200 bytes --]

Hi,

On Wed, Nov 22, 2017 at 09:27:31PM +0100, Christophe JAILLET wrote:
> 'ret' is know to be 0 at this point, because it has not been updated by the
> the previous call to 'abx500_mask_and_set_register_interruptible()'.
> 
> Fix it by updating 'ret' before checking if an error occurred.
> 
> Fixes: 84edbeeab67c ("ab8500-charger: AB8500 charger driver")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/supply/ab8500_charger.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
> index 4ebbcce45c48..1cdbe7a0738d 100644
> --- a/drivers/power/supply/ab8500_charger.c
> +++ b/drivers/power/supply/ab8500_charger.c
> @@ -3218,7 +3218,7 @@ static int ab8500_charger_init_hw_registers(struct ab8500_charger *di)
>  	}
>  
>  	/* Enable backup battery charging */
> -	abx500_mask_and_set_register_interruptible(di->dev,
> +	ret = abx500_mask_and_set_register_interruptible(di->dev,
>  		AB8500_RTC, AB8500_RTC_CTRL_REG,
>  		RTC_BUP_CH_ENA, RTC_BUP_CH_ENA);
>  	if (ret < 0)
> -- 
> 2.14.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2017-12-01 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22 20:27 [PATCH 1/2] power: supply: ab8500_charger: Fix an error handling path Christophe JAILLET
2017-12-01 15:29 ` Sebastian Reichel [this message]

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=20171201152943.ckzvhph45kj76blr@earth \
    --to=sebastian.reichel@collabora.co.uk \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@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