Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1609213 > unrolled thread

[PATCH v2] mfd: ipaq-micro: Delete redundant return value check of platform_get_resource()

Started byBelen Sarabia <belensarabia@gmail.com>
First post2017-03-25 19:30 +0100
Last post2017-03-27 14:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] mfd: ipaq-micro: Delete redundant return value check of  platform_get_resource() Belen Sarabia <belensarabia@gmail.com> - 2017-03-25 19:30 +0100
    Re: [PATCH v2] mfd: ipaq-micro: Delete redundant return value check  of platform_get_resource() Lee Jones <lee.jones@linaro.org> - 2017-03-27 14:50 +0200

#1609213 — [PATCH v2] mfd: ipaq-micro: Delete redundant return value check of platform_get_resource()

FromBelen Sarabia <belensarabia@gmail.com>
Date2017-03-25 19:30 +0100
Subject[PATCH v2] mfd: ipaq-micro: Delete redundant return value check of platform_get_resource()
Message-ID<toYBR-4DA-37@gated-at.bofh.it>
devm_ioremap_resource does checks on the resource. No need to
duplicate this in the driver.

Signed-off-by: Belén Sarabia <belensarabia@gmail.com>
---
Changes in v2:
  - Subject line expected by the subsystem.
  - Remove one line more.
---
 drivers/mfd/ipaq-micro.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c
index df16fd1..124aad2 100644
--- a/drivers/mfd/ipaq-micro.c
+++ b/drivers/mfd/ipaq-micro.c
@@ -400,9 +400,6 @@ static int __init micro_probe(struct platform_device *pdev)
 	micro->dev = &pdev->dev;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -EINVAL;
-
 	micro->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(micro->base))
 		return PTR_ERR(micro->base);
-- 
1.9.1

[toc] | [next] | [standalone]


#1609798 — Re: [PATCH v2] mfd: ipaq-micro: Delete redundant return value check of platform_get_resource()

FromLee Jones <lee.jones@linaro.org>
Date2017-03-27 14:50 +0200
SubjectRe: [PATCH v2] mfd: ipaq-micro: Delete redundant return value check of platform_get_resource()
Message-ID<tpCfU-87G-29@gated-at.bofh.it>
In reply to#1609213
On Sat, 25 Mar 2017, Belen Sarabia wrote:

> devm_ioremap_resource does checks on the resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Belén Sarabia <belensarabia@gmail.com>
> ---
> Changes in v2:
>   - Subject line expected by the subsystem.
>   - Remove one line more.
> ---
>  drivers/mfd/ipaq-micro.c | 3 ---
>  1 file changed, 3 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c
> index df16fd1..124aad2 100644
> --- a/drivers/mfd/ipaq-micro.c
> +++ b/drivers/mfd/ipaq-micro.c
> @@ -400,9 +400,6 @@ static int __init micro_probe(struct platform_device *pdev)
>  	micro->dev = &pdev->dev;
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res)
> -		return -EINVAL;
> -
>  	micro->base = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(micro->base))
>  		return PTR_ERR(micro->base);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web