mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] imx-drm: imx-tve: Remove unneeded check for platform_get_resource()
@ 2013-07-22  1:19 Fabio Estevam
  2013-07-22  8:09 ` Philipp Zabel
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2013-07-22  1:19 UTC (permalink / raw)
  To: gregkh; +Cc: kernel, linux-kernel, Fabio Estevam

From: Fabio Estevam <fabio.estevam@freescale.com>

As devm_ioremap_resource() is used on probe, there is no need to explicitly 
check the return value from platform_get_resource(), as this is something that
devm_ioremap_resource() takes care by itself.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/staging/imx-drm/imx-tve.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c
index a56797d..8232cea 100644
--- a/drivers/staging/imx-drm/imx-tve.c
+++ b/drivers/staging/imx-drm/imx-tve.c
@@ -623,11 +623,6 @@ static int imx_tve_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "failed to get memory region\n");
-		return -ENOENT;
-	}
-
 	base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
-- 
1.8.1.2


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

* Re: [PATCH] imx-drm: imx-tve: Remove unneeded check for platform_get_resource()
  2013-07-22  1:19 [PATCH] imx-drm: imx-tve: Remove unneeded check for platform_get_resource() Fabio Estevam
@ 2013-07-22  8:09 ` Philipp Zabel
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp Zabel @ 2013-07-22  8:09 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: gregkh, kernel, linux-kernel, Fabio Estevam

Am Sonntag, den 21.07.2013, 22:19 -0300 schrieb Fabio Estevam:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> As devm_ioremap_resource() is used on probe, there is no need to explicitly 
> check the return value from platform_get_resource(), as this is something that
> devm_ioremap_resource() takes care by itself.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  drivers/staging/imx-drm/imx-tve.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c
> index a56797d..8232cea 100644
> --- a/drivers/staging/imx-drm/imx-tve.c
> +++ b/drivers/staging/imx-drm/imx-tve.c
> @@ -623,11 +623,6 @@ static int imx_tve_probe(struct platform_device *pdev)
>  	}
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "failed to get memory region\n");
> -		return -ENOENT;
> -	}
> -
>  	base = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(base))
>  		return PTR_ERR(base);

Acked-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp


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

end of thread, other threads:[~2013-07-22  8:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-22  1:19 [PATCH] imx-drm: imx-tve: Remove unneeded check for platform_get_resource() Fabio Estevam
2013-07-22  8:09 ` Philipp Zabel

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

all inboxes | Powered by JetHome®