]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - drivers/phy/microchip/sparx5_serdes.c
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)
commitd1ce245fe409241ed6168c835a5b55ef52bdb6a9
tree6318263c9cde18111317c0806131e316716eac8d
parentd6e9e8e5dd53419814eb54803b4ab3682b55cebe
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