mtd: physmap-core: Fix NULL pointer dereferencing in of_select_probe_type()
mainline inclusion from mainline-v6.1-rc1 commit 8b740c08 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I664DZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8b740c08eb8202817562c358e8d867db0f7d6565 -------------------------------- 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: NZeng Jingxiang <linuszeng@tencent.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220727060302.1560325-1-zengjx95@gmail.comSigned-off-by: NXiang Yang <xiangyang3@huawei.com> Reviewed-by: Nyiyang <yiyang13@huawei.com> Reviewed-by: Nguozihua <guozihua@huawei.com> Reviewed-by: NGONG, Ruiqi <gongruiqi1@huawei.com> Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com> Reviewed-by: NWang Weiyang <wangweiyang2@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录