All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: Fix return value of bcm_kona_i2c_probe()
@ 2021-09-06  5:27 zhaoxiao
  2021-09-16  0:07 ` Florian Fainelli
  2021-09-29 21:05 ` Wolfram Sang
  0 siblings, 2 replies; 4+ messages in thread
From: zhaoxiao @ 2021-09-06  5:27 UTC (permalink / raw)
  To: f.fainelli, rjui, sbranden, bcm-kernel-feedback-list
  Cc: linux-i2c, linux-kernel, zhaoxiao

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

Signed-off-by: zhaoxiao <long870912@gmail.com>
---
 drivers/i2c/busses/i2c-bcm-kona.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-bcm-kona.c b/drivers/i2c/busses/i2c-bcm-kona.c
index ed5e1275ae46..8e350f20cde0 100644
--- a/drivers/i2c/busses/i2c-bcm-kona.c
+++ b/drivers/i2c/busses/i2c-bcm-kona.c
@@ -763,7 +763,7 @@ static int bcm_kona_i2c_probe(struct platform_device *pdev)
 	/* Map hardware registers */
 	dev->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(dev->base))
-		return -ENOMEM;
+		return PTR_ERR(dev->base);
 
 	/* Get and enable external clock */
 	dev->external_clk = devm_clk_get(dev->device, NULL);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread
[parent not found: <20210816083756.22294-1-zhaoxiao@uniontech.com>]

end of thread, other threads:[~2021-09-29 21:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06  5:27 [PATCH] i2c: Fix return value of bcm_kona_i2c_probe() zhaoxiao
2021-09-16  0:07 ` Florian Fainelli
2021-09-29 21:05 ` Wolfram Sang
     [not found] <20210816083756.22294-1-zhaoxiao@uniontech.com>
2021-08-22  9:07 ` Florian Fainelli

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.