diff mbox series

[1/4] iio: imx7d_adc: Remove unneeded error message

Message ID 20190603193433.6394-1-festevam@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/4] iio: imx7d_adc: Remove unneeded error message | expand

Commit Message

Fabio Estevam June 3, 2019, 7:34 p.m. UTC
In case of ioremap failure, the core code will take care of printing
the error message, so there is no need for having a local error
message in the driver.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/iio/adc/imx7d_adc.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

Jonathan Cameron June 8, 2019, 12:58 p.m. UTC | #1
On Mon,  3 Jun 2019 16:34:30 -0300
Fabio Estevam <festevam@gmail.com> wrote:

> In case of ioremap failure, the core code will take care of printing
> the error message, so there is no need for having a local error
> message in the driver.
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.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/imx7d_adc.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/iio/adc/imx7d_adc.c b/drivers/iio/adc/imx7d_adc.c
> index 4fe97c2a0f43..23c7b0ee945f 100644
> --- a/drivers/iio/adc/imx7d_adc.c
> +++ b/drivers/iio/adc/imx7d_adc.c
> @@ -493,11 +493,8 @@ static int imx7d_adc_probe(struct platform_device *pdev)
>  	info->dev = dev;
>  
>  	info->regs = devm_platform_ioremap_resource(pdev, 0);
> -	if (IS_ERR(info->regs)) {
> -		ret = PTR_ERR(info->regs);
> -		dev_err(dev, "Failed to remap adc memory, err = %d\n", ret);
> -		return ret;
> -	}
> +	if (IS_ERR(info->regs))
> +		return PTR_ERR(info->regs);
>  
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
diff mbox series

Patch

diff --git a/drivers/iio/adc/imx7d_adc.c b/drivers/iio/adc/imx7d_adc.c
index 4fe97c2a0f43..23c7b0ee945f 100644
--- a/drivers/iio/adc/imx7d_adc.c
+++ b/drivers/iio/adc/imx7d_adc.c
@@ -493,11 +493,8 @@  static int imx7d_adc_probe(struct platform_device *pdev)
 	info->dev = dev;
 
 	info->regs = devm_platform_ioremap_resource(pdev, 0);
-	if (IS_ERR(info->regs)) {
-		ret = PTR_ERR(info->regs);
-		dev_err(dev, "Failed to remap adc memory, err = %d\n", ret);
-		return ret;
-	}
+	if (IS_ERR(info->regs))
+		return PTR_ERR(info->regs);
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {