All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] phy: ti: j721e-wiz: Fix return value check in wiz_probe()
@ 2020-01-10  1:25 ` Wei Yongjun
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Yongjun @ 2020-01-10  1:25 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Philipp Zabel, Jyri Sarha
  Cc: Wei Yongjun, linux-kernel, kernel-janitors

In case of error, the function devm_ioremap() returns NULL pointer not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.

Fixes: b46f531313a4 ("phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/phy/ti/phy-j721e-wiz.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c
index b86ebdd68302..b9654ec89662 100644
--- a/drivers/phy/ti/phy-j721e-wiz.c
+++ b/drivers/phy/ti/phy-j721e-wiz.c
@@ -762,7 +762,7 @@ static int wiz_probe(struct platform_device *pdev)
 	}
 
 	base = devm_ioremap(dev, res.start, resource_size(&res));
-	if (IS_ERR(base))
+	if (!base)
 		goto err_addr_to_resource;
 
 	regmap = devm_regmap_init_mmio(dev, base, &wiz_regmap_config);




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

* [PATCH -next] phy: ti: j721e-wiz: Fix return value check in wiz_probe()
@ 2020-01-10  1:25 ` Wei Yongjun
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Yongjun @ 2020-01-10  1:25 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Philipp Zabel, Jyri Sarha
  Cc: Wei Yongjun, linux-kernel, kernel-janitors

In case of error, the function devm_ioremap() returns NULL pointer not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.

Fixes: b46f531313a4 ("phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/phy/ti/phy-j721e-wiz.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c
index b86ebdd68302..b9654ec89662 100644
--- a/drivers/phy/ti/phy-j721e-wiz.c
+++ b/drivers/phy/ti/phy-j721e-wiz.c
@@ -762,7 +762,7 @@ static int wiz_probe(struct platform_device *pdev)
 	}
 
 	base = devm_ioremap(dev, res.start, resource_size(&res));
-	if (IS_ERR(base))
+	if (!base)
 		goto err_addr_to_resource;
 
 	regmap = devm_regmap_init_mmio(dev, base, &wiz_regmap_config);

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

end of thread, other threads:[~2020-01-10  1:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-10  1:25 [PATCH -next] phy: ti: j721e-wiz: Fix return value check in wiz_probe() Wei Yongjun
2020-01-10  1:25 ` Wei Yongjun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.