phy: renesas: rcar-gen3-usb2: Fix returning wrong error code
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Fri, 5 Jan 2024 09:37:03 +0000 (18:37 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2024 18:10:42 +0000 (19:10 +0100)
commit6f67140cf7e100d87ddecd63e9b5678b058c9e82
treef180d92fe1be612585746f704bd92b777fcab4df
parent5cd8a51517ce15edbdcea4fc74c4c127ddaa1bd6
phy: renesas: rcar-gen3-usb2: Fix returning wrong error code

[ Upstream commit 249abaf3bf0dd07f5ddebbb2fe2e8f4d675f074e ]

Even if device_create_file() returns error code,
rcar_gen3_phy_usb2_probe() will return zero because the "ret" is
variable shadowing.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202312161021.gOLDl48K-lkp@intel.com/
Fixes: 441a681b8843 ("phy: rcar-gen3-usb2: fix implementation for runtime PM")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240105093703.3359949-1-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/renesas/phy-rcar-gen3-usb2.c