]> www.infradead.org Git - users/jedix/linux-maple.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)
commit633bad3dc81ce2aa561f704ec091e49eb647bd0b
tree368aeeca1cfcc028a47ad01203aef35dcff82c1a
parent00b433d5664abf96d2c286fa57899fce7e3c4ce9
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: 499fef09a323 ("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