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)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 3 May 2022 09:07:32 +0000 (11:07 +0200)
commit7a6bc33ab54923d325d9a1747ec9652c4361ebd1
treede2a26727f732c9fe9bafab630f7b054a659cdf1
parentb800528b97d0adc3a5ba42d78a8b0d3f07a31f44
net: emaclite: Add error handling for of_address_to_resource()

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>
drivers/net/ethernet/xilinx/xilinx_emaclite.c