public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mfd: ipaq-micro: Delete redundant return value check of platform_get_resource()
@ 2017-03-25 18:26 Belen Sarabia
  2017-03-27 12:41 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Belen Sarabia @ 2017-03-25 18:26 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel

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

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

* Re: [PATCH v2] mfd: ipaq-micro: Delete redundant return value check of platform_get_resource()
  2017-03-25 18:26 [PATCH v2] mfd: ipaq-micro: Delete redundant return value check of platform_get_resource() Belen Sarabia
@ 2017-03-27 12:41 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2017-03-27 12:41 UTC (permalink / raw)
  To: Belen Sarabia; +Cc: linux-kernel

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

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

end of thread, other threads:[~2017-03-27 12:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-25 18:26 [PATCH v2] mfd: ipaq-micro: Delete redundant return value check of platform_get_resource() Belen Sarabia
2017-03-27 12:41 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox