[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR10MB31673DC2ED738C26A8D30046ECF49@VI1PR10MB3167.EURPRD10.PROD.OUTLOOK.COM>
Date: Thu, 21 Apr 2022 09:24:50 +0000
From: Adam Ward <Adam.Ward.opensource@...semi.com>
To: Wei Yongjun <weiyongjun1@...wei.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: Support Opensource <Support.Opensource@...semi.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Adam Ward <Adam.Ward.opensource@...semi.com>,
Hulk Robot <hulkci@...wei.com>
Subject: RE: [PATCH] regulator: da9121: Fix uninit-value in
da9121_assign_chip_model()
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@...wei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
Reviewed-by: Adam Ward <Adam.Ward.Opensource@...semi.com>
Powered by blists - more mailing lists