All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] pwm: samsung: fix return value check in pwm_samsung_probe()
@ 2013-06-25 22:55 ` Wei Yongjun
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2013-06-25 22:55 UTC (permalink / raw)
  To: thierry.reding, grant.likely, rob.herring, tomasz.figa
  Cc: yongjun_wei, linux-pwm, devicetree-discuss

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/pwm/pwm-samsung.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c
index 2eb5439..6689c55 100644
--- a/drivers/pwm/pwm-samsung.c
+++ b/drivers/pwm/pwm-samsung.c
@@ -482,8 +482,8 @@ static int pwm_samsung_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	chip->base = devm_ioremap_resource(&pdev->dev, res);
-	if (!chip->base)
-		return -ENOMEM;
+	if (IS_ERR(chip->base))
+		return PTR_ERR(chip->base);
 
 	chip->base_clk = devm_clk_get(&pdev->dev, "timers");
 	if (IS_ERR(chip->base_clk)) {

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

* [PATCH -next] pwm: samsung: fix return value check in pwm_samsung_probe()
@ 2013-06-25 22:55 ` Wei Yongjun
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2013-06-25 22:55 UTC (permalink / raw)
  To: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-pwm-u79uwXL29TY76Z2rM5mHXA,
	yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>

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

Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
---
 drivers/pwm/pwm-samsung.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c
index 2eb5439..6689c55 100644
--- a/drivers/pwm/pwm-samsung.c
+++ b/drivers/pwm/pwm-samsung.c
@@ -482,8 +482,8 @@ static int pwm_samsung_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	chip->base = devm_ioremap_resource(&pdev->dev, res);
-	if (!chip->base)
-		return -ENOMEM;
+	if (IS_ERR(chip->base))
+		return PTR_ERR(chip->base);
 
 	chip->base_clk = devm_clk_get(&pdev->dev, "timers");
 	if (IS_ERR(chip->base_clk)) {

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

* Re: [PATCH -next] pwm: samsung: fix return value check in pwm_samsung_probe()
@ 2013-06-26  9:46   ` Thierry Reding
  0 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2013-06-26  9:46 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: grant.likely, rob.herring, tomasz.figa, yongjun_wei, Kukjin Kim,
	linux-pwm, devicetree-discuss

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

On Wed, Jun 26, 2013 at 06:55:18AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> In case of error, the function devm_ioremap_resource() returns ERR_PTR()
> and never returns NULL. The NULL test in the return value check should
> be replaced with IS_ERR().
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  drivers/pwm/pwm-samsung.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Missed another one of those. Given that this isn't merged yet, would you
mind if Tomasz and/or Kukjin squash it into their patch?

If that's okay with Wei, can you, Tomasz or Kukjin, make sure to credit
Wei properly?

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH -next] pwm: samsung: fix return value check in pwm_samsung_probe()
@ 2013-06-26  9:46   ` Thierry Reding
  0 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2013-06-26  9:46 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: linux-pwm-u79uwXL29TY76Z2rM5mHXA, Kukjin Kim,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A


[-- Attachment #1.1: Type: text/plain, Size: 762 bytes --]

On Wed, Jun 26, 2013 at 06:55:18AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
> 
> In case of error, the function devm_ioremap_resource() returns ERR_PTR()
> and never returns NULL. The NULL test in the return value check should
> be replaced with IS_ERR().
> 
> Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
> ---
>  drivers/pwm/pwm-samsung.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Missed another one of those. Given that this isn't merged yet, would you
mind if Tomasz and/or Kukjin squash it into their patch?

If that's okay with Wei, can you, Tomasz or Kukjin, make sure to credit
Wei properly?

Thierry

[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

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

* Re: [PATCH -next] pwm: samsung: fix return value check in pwm_samsung_probe()
  2013-06-26  9:46   ` Thierry Reding
@ 2013-06-26  9:56     ` Wei Yongjun
  -1 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2013-06-26  9:56 UTC (permalink / raw)
  To: thierry.reding
  Cc: grant.likely, rob.herring, tomasz.figa, yongjun_wei, kgene.kim,
	linux-pwm, devicetree-discuss

On 06/26/2013 05:46 PM, Thierry Reding wrote:
> On Wed, Jun 26, 2013 at 06:55:18AM +0800, Wei Yongjun wrote:
>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>
>> In case of error, the function devm_ioremap_resource() returns ERR_PTR()
>> and never returns NULL. The NULL test in the return value check should
>> be replaced with IS_ERR().
>>
>> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>> ---
>>  drivers/pwm/pwm-samsung.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> Missed another one of those. Given that this isn't merged yet, would you
> mind if Tomasz and/or Kukjin squash it into their patch?

It's OK to me.

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

* Re: [PATCH -next] pwm: samsung: fix return value check in pwm_samsung_probe()
@ 2013-06-26  9:56     ` Wei Yongjun
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2013-06-26  9:56 UTC (permalink / raw)
  To: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-pwm-u79uwXL29TY76Z2rM5mHXA,
	kgene.kim-Sze3O3UU22JBDgjK7y7TUQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A

On 06/26/2013 05:46 PM, Thierry Reding wrote:
> On Wed, Jun 26, 2013 at 06:55:18AM +0800, Wei Yongjun wrote:
>> From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
>>
>> In case of error, the function devm_ioremap_resource() returns ERR_PTR()
>> and never returns NULL. The NULL test in the return value check should
>> be replaced with IS_ERR().
>>
>> Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
>> ---
>>  drivers/pwm/pwm-samsung.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> Missed another one of those. Given that this isn't merged yet, would you
> mind if Tomasz and/or Kukjin squash it into their patch?

It's OK to me.

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

end of thread, other threads:[~2013-06-26  9:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-25 22:55 [PATCH -next] pwm: samsung: fix return value check in pwm_samsung_probe() Wei Yongjun
2013-06-25 22:55 ` Wei Yongjun
2013-06-26  9:46 ` Thierry Reding
2013-06-26  9:46   ` Thierry Reding
2013-06-26  9:56   ` Wei Yongjun
2013-06-26  9:56     ` 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.