net: emaclite: Add error handling for of_address_to_resource()
authorShravya Kumbham <shravya.kumbham@xilinx.com>
Mon, 2 May 2022 07:27:50 +0000 (12:57 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:30:17 +0000 (12:30 +0200)
commitda07b2e273b31937528bc1e260178c2133b3dfc9
tree474713f8c7f98e05ad0887913e29907b90e49d33
parent8010fdba29e46d2ae2a8dbd513ca380aef8c1f67
net: emaclite: Add error handling for of_address_to_resource()

commit 7a6bc33ab54923d325d9a1747ec9652c4361ebd1 upstream.

check the return value of of_address_to_resource() and also add
missing of_node_put() for np and npp nodes.

Fixes: e0a3bc65448c ("net: emaclite: Support multiple phys connected to one MDIO bus")
Addresses-Coverity: Event check_return value.
Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/xilinx/xilinx_emaclite.c