Skip to content

Commit fdc355a

Browse files
seehearfeelvinodkoul
authored andcommitted
phy: rockchip: Fix return value of inno_dsidphy_probe()
When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Fixes: b7535a3 ("phy/rockchip: Add support for Innosilicon MIPI/LVDS/TTL PHY") Signed-off-by: Tiezhu Yang <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 5a72122 commit fdc355a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,8 @@ static int inno_dsidphy_probe(struct platform_device *pdev)
607607
platform_set_drvdata(pdev, inno);
608608

609609
inno->phy_base = devm_platform_ioremap_resource(pdev, 0);
610-
if (!inno->phy_base)
611-
return -ENOMEM;
610+
if (IS_ERR(inno->phy_base))
611+
return PTR_ERR(inno->phy_base);
612612

613613
inno->ref_clk = devm_clk_get(dev, "ref");
614614
if (IS_ERR(inno->ref_clk)) {

0 commit comments

Comments
 (0)