fsl/fman: Fix missing put_device() call in fman_port_probe
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 30 Dec 2021 12:26:27 +0000 (12:26 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jan 2022 11:37:45 +0000 (12:37 +0100)
commita7d3a1c6d9d97b2a31665ce7200929bac0449e02
treec9f3f6c5ad7a64ba6c98bb15d4726e68e720a64f
parent2dc95e936414c35ae1e9ae94c8f071a627717148
fsl/fman: Fix missing put_device() call in fman_port_probe

[ Upstream commit bf2b09fedc17248b315f80fb249087b7d28a69a6 ]

The reference taken by 'of_find_device_by_node()' must be released when
not needed anymore.
Add the corresponding 'put_device()' in the and error handling paths.

Fixes: 18a6c85fcc78 ("fsl/fman: Add FMan Port Support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/freescale/fman/fman_port.c