]> git.baikalelectronics.ru Git - kernel.git/commit
reset: uniphier-glue: Fix possible null-ptr-deref
authorHui Tang <tanghui20@huawei.com>
Mon, 14 Nov 2022 00:49:58 +0000 (08:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:34:05 +0000 (08:34 +0100)
commit50534695ae807c7882835adbee72eeb7eb41eb19
tree368aeeca1cfcc028a47ad01203aef35dcff82c1a
parent9061b72fd85d504d4d5b3bf6affbf63dda701fe8
reset: uniphier-glue: Fix possible null-ptr-deref

[ Upstream commit 692eec92424e7d1de7e476c8382159f8269d4473 ]

It will cause null-ptr-deref when resource_size(res) invoked,
if platform_get_resource() returns NULL.

Fixes: 739286f826b8 ("reset: uniphier: add USB3 core reset control")
Signed-off-by: Hui Tang <tanghui20@huawei.com>
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://lore.kernel.org/r/20221114004958.258513-1-tanghui20@huawei.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/reset/reset-uniphier-glue.c