]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: check return value after calling platform_get_resource()
authorYang Yingliang <yangyingliang@huawei.com>
Sat, 5 Jun 2021 02:31:48 +0000 (10:31 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Jun 2021 21:02:25 +0000 (14:02 -0700)
commit3d24eb5eafc9b3b16dbc313e10e39baebd715fdb
tree3b927492f3a9829ad7be522f5b7a60d1de4f7841
parent47faab30580b3fe0ee23a3071238ed263be5c40c
net: mscc: ocelot: 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>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/seville_vsc9953.c