Re: [PATCH] mfd: mt6370: Add the overbound check to prevent the null pointer

From: Andy Shevchenko
Date: Thu Oct 20 2022 - 13:17:22 EST


On Thu, Oct 20, 2022 at 7:31 PM cy_huang <u0084500@xxxxxxxxx> wrote:
>
> From: ChiYuan Huang <cy_huang@xxxxxxxxxxx>
>
> This potential risk could happen at regmap_raw_read or
> regmap_raw_write when accessing the over-bound register address.

Functions are referred to as func().

> Below's the issue reproduced log to access over-bound register with
> regmap_raw_read function.

Ditto.

> [ 41.301385] Hardware name: Raspberry Pi 4 Model B Rev 1.2 (DT)
> [ 41.307296] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)

Please, read Submitting Patches, and trim your commit message accordingly.

--
With Best Regards,
Andy Shevchenko