phy: samsung: exynos5250-sata: fix missing device put in probe error paths
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 7 Apr 2022 09:18:57 +0000 (11:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:17:06 +0000 (12:17 +0200)
commit500a7173fcc9d81670579f81e827c259c35edad3
tree411347ff50ba179ea48825c9fb010e0a6e36d4a2
parente1743f448641e38ef388c995f61791d96c2c2215
phy: samsung: exynos5250-sata: fix missing device put in probe error paths

[ Upstream commit 5c8402c4db45dd55c2c93c8d730f5dfa7c78a702 ]

The actions of of_find_i2c_device_by_node() in probe function should be
reversed in error paths by putting the reference to obtained device.

Fixes: bcff4cba41bc ("PHY: Exynos: Add Exynos5250 SATA PHY driver")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Link: https://lore.kernel.org/r/20220407091857.230386-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/samsung/phy-exynos5250-sata.c