[PATCH] mtd: physmap-core: Fix NULL pointer dereferencing in of_select_probe_type()
Miquel Raynal
miquel.raynal at bootlin.com
Mon Sep 19 09:16:04 PDT 2022
On Wed, 2022-07-27 at 06:03:02 UTC, Zeng Jingxiang wrote:
> From: Zeng Jingxiang <linuszeng at tencent.com>
>
> Coverity complains of a possible NULL dereference:
>
> in of_select_probe_type():
> 1. returned_null: of_match_device() returns NULL.
> 2. var_assigned: match = NULL return value from of_match_device()
> 309 match = of_match_device(of_flash_match, &dev->dev);
>
> 3.dereference: Dereferencing the NULL pointer match.
> 310 probe_type = match->data;
>
> Signed-off-by: Zeng Jingxiang <linuszeng at tencent.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
More information about the linux-mtd
mailing list