Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] phy: rockchip: Fix return value of inno_dsidphy_probe()
@ 2020-05-25 13:08 Tiezhu Yang
       [not found] ` <1590412138-13903-1-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
  2020-06-24 13:01 ` [PATCH v2 1/2] phy: rockchip: Fix return value of inno_dsidphy_probe() Vinod Koul
  0 siblings, 2 replies; 4+ messages in thread
From: Tiezhu Yang @ 2020-05-25 13:08 UTC (permalink / raw)
  To: Heiko Stuebner, Kishon Vijay Abraham I, Vinod Koul,
	Matthias Brugger
  Cc: linux-rockchip, linux-kernel, Xuefeng Li, Tiezhu Yang

When call function devm_platform_ioremap_resource(), we should use IS_ERR()
to check the return value and return PTR_ERR() if failed.

Fixes: b7535a3bc0ba ("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>
---

v2:
  - No changes, just add Reviewed-by tag

 drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
index a7c6c94..8af8c6c 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
@@ -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)) {
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-24 13:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-25 13:08 [PATCH v2 1/2] phy: rockchip: Fix return value of inno_dsidphy_probe() Tiezhu Yang
     [not found] ` <1590412138-13903-1-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
2020-05-25 13:08   ` [PATCH v2 2/2] phy: Remove CONFIG_ARCH_* check for related subdir in Makefile Tiezhu Yang
2020-05-25 15:01     ` Heiko Stübner
2020-06-24 13:01 ` [PATCH v2 1/2] phy: rockchip: Fix return value of inno_dsidphy_probe() Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox