]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: check return value after calling platform_get_resource()
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 7 Jun 2021 13:38:37 +0000 (21:38 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Jun 2021 21:07:22 +0000 (14:07 -0700)
commit800bafb2b22793cf2dc175121f0626800daa08fa
tree3c6eae205f4b3b7064e30b0b9475bdc84da8b71a
parent076482cefd9045de45cf2f1d98fb5c9ca32d36d3
net: bcmgenet: check return value after calling platform_get_resource()

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>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmmii.c