]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: w5100: check return value after calling platform_get_resource()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 31 Aug 2021 08:40:18 +0000 (16:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Sep 2021 09:48:09 +0000 (11:48 +0200)
commit0cc9af2dffee3ba20d17a91d22acbc9b6488e5af
tree7003c668b6722f09684dfe2f426a66bf59e92f16
parentc97090607058f516880f60733b4302c695385a8b
net: w5100: check return value after calling platform_get_resource()

[ Upstream commit a39ff4a47f3e1da3b036817ef436b1a9be10783a ]

It will cause null-ptr-deref if platform_get_resource() returns NULL,
we need check the return value.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/wiznet/w5100.c