mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adam Ward <Adam.Ward.opensource@diasemi.com>
To: Wei Yongjun <weiyongjun1@huawei.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Support Opensource <Support.Opensource@diasemi.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Adam Ward <Adam.Ward.opensource@diasemi.com>,
	Hulk Robot <hulkci@huawei.com>
Subject: RE: [PATCH] regulator: da9121: Fix uninit-value in da9121_assign_chip_model()
Date: Thu, 21 Apr 2022 09:24:50 +0000	[thread overview]
Message-ID: <VI1PR10MB31673DC2ED738C26A8D30046ECF49@VI1PR10MB3167.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20220421090335.1876149-1-weiyongjun1@huawei.com>

On 21 April 2022 10:04, Wei Yongjun wrote:

> This happend when da9121 device is probe by da9121_i2c_id, but with
> invalid dts. Thus, chip->subvariant_id is set to -EINVAL, and later
> da9121_assign_chip_model() will access 'regmap' without init it.
> 
> Fix it by return -EINVAL from da9121_assign_chip_model() if
> 'chip->subvariant_id' is invalid.
> 
> Fixes: f3fbd5566f6a ("regulator: da9121: Add device variants")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Reviewed-by: Adam Ward <Adam.Ward.Opensource@diasemi.com>


  reply	other threads:[~2022-04-21  9:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21  9:03 Wei Yongjun
2022-04-21  9:24 ` Adam Ward [this message]
2022-04-21 15:54 ` Mark Brown

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=VI1PR10MB31673DC2ED738C26A8D30046ECF49@VI1PR10MB3167.EURPRD10.PROD.OUTLOOK.COM \
    --to=adam.ward.opensource@diasemi.com \
    --cc=Support.Opensource@diasemi.com \
    --cc=broonie@kernel.org \
    --cc=hulkci@huawei.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weiyongjun1@huawei.com \
    /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®