]> git.baikalelectronics.ru Git - kernel.git/commit
phy: Sparx5 Eth SerDes: check return value after calling platform_get_resource()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 3 Jun 2021 05:10:14 +0000 (13:10 +0800)
committerVinod Koul <vkoul@kernel.org>
Thu, 3 Jun 2021 05:48:19 +0000 (11:18 +0530)
commit80ede32a6aea9950cf6c22a4c2e3578415e15eca
tree6318263c9cde18111317c0806131e316716eac8d
parentb2972a111d3ddfe9ae2eedf6e3bcd4640c965168
phy: Sparx5 Eth SerDes: 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>
Link: https://lore.kernel.org/r/20210603051014.2674744-1-yangyingliang@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/microchip/sparx5_serdes.c