linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] iio: ep93xx: remove redundant return value check of platform_get_resource()
@ 2018-01-17 11:30 Wei Yongjun
  2018-01-20 16:43 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2018-01-17 11:30 UTC (permalink / raw)
  To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Greg Kroah-Hartman, Alexander Sverdlin
  Cc: Wei Yongjun, linux-iio

Remove unneeded error handling on the result of a call
to platform_get_resource() when the value is passed to
devm_ioremap_resource().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/iio/adc/ep93xx_adc.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c
index 81c9015..5036c392 100644
--- a/drivers/iio/adc/ep93xx_adc.c
+++ b/drivers/iio/adc/ep93xx_adc.c
@@ -167,10 +167,6 @@ static int ep93xx_adc_probe(struct platform_device *pdev)
 	priv = iio_priv(iiodev);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "Cannot obtain memory resource\n");
-		return -ENXIO;
-	}
 	priv->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(priv->base)) {
 		dev_err(&pdev->dev, "Cannot map memory resource\n");


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

* Re: [PATCH -next] iio: ep93xx: remove redundant return value check of platform_get_resource()
  2018-01-17 11:30 [PATCH -next] iio: ep93xx: remove redundant return value check of platform_get_resource() Wei Yongjun
@ 2018-01-20 16:43 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2018-01-20 16:43 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Greg Kroah-Hartman, Alexander Sverdlin, linux-iio

On Wed, 17 Jan 2018 11:30:00 +0000
Wei Yongjun <weiyongjun1@huawei.com> wrote:

> Remove unneeded error handling on the result of a call
> to platform_get_resource() when the value is passed to
> devm_ioremap_resource().
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/ep93xx_adc.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c
> index 81c9015..5036c392 100644
> --- a/drivers/iio/adc/ep93xx_adc.c
> +++ b/drivers/iio/adc/ep93xx_adc.c
> @@ -167,10 +167,6 @@ static int ep93xx_adc_probe(struct platform_device *pdev)
>  	priv = iio_priv(iiodev);
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "Cannot obtain memory resource\n");
> -		return -ENXIO;
> -	}
>  	priv->base = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(priv->base)) {
>  		dev_err(&pdev->dev, "Cannot map memory resource\n");
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

end of thread, other threads:[~2018-01-20 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-17 11:30 [PATCH -next] iio: ep93xx: remove redundant return value check of platform_get_resource() Wei Yongjun
2018-01-20 16:43 ` Jonathan Cameron

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).