All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>, Kate Hsuan <hpa@redhat.com>,
	Chen-Yu Tsai <wens@csie.org>,
	linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Hulk Robot <hulkci@huawei.com>
Subject: Re: [PATCH -next] power: supply: axp288_charger: Fix missing mutex_init()
Date: Wed, 13 Oct 2021 15:33:13 +0200	[thread overview]
Message-ID: <20211013133313.hao3uvvi65tufgy7@earth.universe> (raw)
In-Reply-To: <d3690325-9d55-607b-cf51-048f634ef7b5@redhat.com>

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

Hi,

On Wed, Oct 13, 2021 at 01:49:19PM +0200, Hans de Goede wrote:
> On 10/13/21 11:31 AM, Wei Yongjun wrote:
> > The driver allocates the mutex but not initialize it.
> > Use mutex_init() on it to initialize it correctly.
> > 
> > Fixes: ed229454856e ("power: supply: axp288-charger: Optimize register reading method")
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Thanks, patch looks good to me
> (I should have catched this myself during review...) :
> 
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Thanks, queued.

-- Sebastian

> > ---
> >  drivers/power/supply/axp288_charger.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/power/supply/axp288_charger.c b/drivers/power/supply/axp288_charger.c
> > index fd4983c98fd9..9987b1731e38 100644
> > --- a/drivers/power/supply/axp288_charger.c
> > +++ b/drivers/power/supply/axp288_charger.c
> > @@ -865,6 +865,7 @@ static int axp288_charger_probe(struct platform_device *pdev)
> >  	if (!info)
> >  		return -ENOMEM;
> >  
> > +	mutex_init(&info->lock);
> >  	info->pdev = pdev;
> >  	info->regmap = axp20x->regmap;
> >  	info->regmap_irqc = axp20x->regmap_irqc;
> > 
> 

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

      reply	other threads:[~2021-10-13 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13  9:31 [PATCH -next] power: supply: axp288_charger: Fix missing mutex_init() Wei Yongjun
2021-10-13 11:49 ` Hans de Goede
2021-10-13 13:33   ` 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=20211013133313.hao3uvvi65tufgy7@earth.universe \
    --to=sebastian.reichel@collabora.com \
    --cc=hdegoede@redhat.com \
    --cc=hpa@redhat.com \
    --cc=hulkci@huawei.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=weiyongjun1@huawei.com \
    --cc=wens@csie.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.