linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] i2c: Fix return value of bcm_kona_i2c_probe()
       [not found] <20210816083756.22294-1-zhaoxiao@uniontech.com>
@ 2021-08-22  9:07 ` Florian Fainelli
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2021-08-22  9:07 UTC (permalink / raw)
  To: zhaoxiao, f.fainelli, rjui, sbranden, bcm-kernel-feedback-list
  Cc: linux-i2c, linux-kernel



On 8/16/2021 10:37 AM, zhaoxiao wrote:
> 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 <zhaoxiao@uniontech.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [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
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2021-09-29 21:05 UTC (permalink / raw)
  To: zhaoxiao
  Cc: f.fainelli, rjui, sbranden, bcm-kernel-feedback-list, linux-i2c,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

On Mon, Sep 06, 2021 at 01:27:30PM +0800, zhaoxiao wrote:
> 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>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [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
  1 sibling, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2021-09-16  0:07 UTC (permalink / raw)
  To: zhaoxiao, f.fainelli, rjui, sbranden, bcm-kernel-feedback-list
  Cc: linux-i2c, linux-kernel



On 9/5/2021 10:27 PM, zhaoxiao wrote:
> 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>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* [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

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 --
     [not found] <20210816083756.22294-1-zhaoxiao@uniontech.com>
2021-08-22  9:07 ` [PATCH] i2c: Fix return value of bcm_kona_i2c_probe() Florian Fainelli
2021-09-06  5:27 zhaoxiao
2021-09-16  0:07 ` Florian Fainelli
2021-09-29 21:05 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).