Skip to content

Commit

Permalink
phy: rockchip: Fix return value of inno_dsidphy_probe()
Browse files Browse the repository at this point in the history
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 <yangtiezhu@loongson.cn>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/1590412138-13903-1-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Tiezhu Yang authored and Vinod Koul committed Jun 24, 2020
1 parent 5a72122 commit fdc355a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,8 @@ static int inno_dsidphy_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, inno);

inno->phy_base = devm_platform_ioremap_resource(pdev, 0);
if (!inno->phy_base)
return -ENOMEM;
if (IS_ERR(inno->phy_base))
return PTR_ERR(inno->phy_base);

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

0 comments on commit fdc355a

Please sign in to comment.