]> 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)
commit40d290d6f15a4173f35008b174517f1b209ea999
tree368aeeca1cfcc028a47ad01203aef35dcff82c1a
parentcdfe1a9b0e8fd31f63c002b7a5e1ce5022c54eca
reset: uniphier-glue: Fix possible null-ptr-deref

[ Upstream commit 3a2390c6777e3f6662980c6cfc25cafe9e4fef98 ]

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

Fixes: d3afeb219515 ("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