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


Groups > linux.kernel > #1458742

Re: [PATCH] i2c: don't print error when adding adapter fails

From Guenter Roeck <linux@roeck-us.net>
Newsgroups linux.kernel
Subject Re: [PATCH] i2c: don't print error when adding adapter fails
Date 2016-08-09 15:40 +0200
Message-ID <s4fqa-8bw-9@gated-at.bofh.it> (permalink)
References <s4dy1-6VH-19@gated-at.bofh.it> <s4dy2-6VH-57@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 08/09/2016 04:36 AM, Wolfram Sang wrote:
> The core will do this for us now.
>
> Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
> ---
[ ... ]

> diff --git a/drivers/i2c/busses/i2c-uniphier-f.c b/drivers/i2c/busses/i2c-uniphier-f.c
> index aeead0d27d1007..64318e69089439 100644
> --- a/drivers/i2c/busses/i2c-uniphier-f.c
> +++ b/drivers/i2c/busses/i2c-uniphier-f.c
> @@ -550,15 +550,10 @@ static int uniphier_fi2c_probe(struct platform_device *pdev)
>  	}
>
>  	ret = i2c_add_adapter(&priv->adap);
> -	if (ret) {
> -		dev_err(dev, "failed to add I2C adapter\n");
> -		goto err;
> -	}
> -
> -err:
>  	if (ret)
>  		clk_disable_unprepare(priv->clk);
>
> + err:

You sure about that one ? It leaves the clock enabled in some of the error paths.

>  	return ret;
>  }
>
> diff --git a/drivers/i2c/busses/i2c-uniphier.c b/drivers/i2c/busses/i2c-uniphier.c
> index 475a5eb514e215..94f64cccfdef08 100644
> --- a/drivers/i2c/busses/i2c-uniphier.c
> +++ b/drivers/i2c/busses/i2c-uniphier.c
> @@ -407,15 +407,10 @@ static int uniphier_i2c_probe(struct platform_device *pdev)
>  	}
>
>  	ret = i2c_add_adapter(&priv->adap);
> -	if (ret) {
> -		dev_err(dev, "failed to add I2C adapter\n");
> -		goto err;
> -	}
> -
> -err:
>  	if (ret)
>  		clk_disable_unprepare(priv->clk);
>
> + err:

Same as above.

Note: I dropped all individuals from Cc:; my mailer refused to accept the reply because there
were too many.

Guenter

>  	return ret;
>  }
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] i2c: don't print error when adding adapter fails Wolfram Sang <wsa-dev@sang-engineering.com> - 2016-08-09 13:40 +0200
  [PATCH] i2c: don't print error when adding adapter fails Wolfram Sang <wsa-dev@sang-engineering.com> - 2016-08-09 13:40 +0200
    Re: [PATCH] i2c: don't print error when adding adapter fails Peter Korsgaard <peter@korsgaard.com> - 2016-08-09 13:50 +0200
    Re: [PATCH] i2c: don't print error when adding adapter fails Grygorii Strashko <grygorii.strashko@ti.com> - 2016-08-09 14:00 +0200
    Re: [PATCH] i2c: don't print error when adding adapter fails Uwe Kleine-König   <u.kleine-koenig@pengutronix.de> - 2016-08-09 14:10 +0200
      Re: [PATCH] i2c: don't print error when adding adapter fails Wolfram Sang <wsa@the-dreams.de> - 2016-08-09 16:10 +0200
    Re: [PATCH] i2c: don't print error when adding adapter fails Heiko Stübner <heiko@sntech.de> - 2016-08-09 14:20 +0200
    Re: [PATCH] i2c: don't print error when adding adapter fails Thierry Reding <thierry.reding@gmail.com> - 2016-08-09 15:00 +0200
    Re: [PATCH] i2c: don't print error when adding adapter fails Neil Horman <nhorman@tuxdriver.com> - 2016-08-09 15:00 +0200
    Re: [PATCH] i2c: don't print error when adding adapter fails Guenter Roeck <linux@roeck-us.net> - 2016-08-09 15:40 +0200
      Re: [PATCH] i2c: don't print error when adding adapter fails Wolfram Sang <wsa@the-dreams.de> - 2016-08-09 16:40 +0200
    Re: [PATCH] i2c: don't print error when adding adapter fails Ray Jui <ray.jui@broadcom.com> - 2016-08-09 18:20 +0200
    Re: [PATCH] i2c: don't print error when adding adapter fails Vladimir Zapolskiy <vz@mleia.com> - 2016-08-09 18:40 +0200
    Re: [PATCH] i2c: don't print error when adding adapter fails Ludovic Desroches <ludovic.desroches@atmel.com> - 2016-08-10 20:10 +0200
    Re: [PATCH] i2c: don't print error when adding adapter fails Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-08-10 20:50 +0200
    Re: [PATCH] i2c: don't print error when adding adapter fails Laxman Dewangan <ldewangan@nvidia.com> - 2016-08-10 22:50 +0200
  Re: [PATCH] i2c: don't print error when adding adapter fails Joachim Eastwood <manabian@gmail.com> - 2016-08-09 18:50 +0200
  Re: [STLinux Kernel] [PATCH] i2c: don't print error when adding  adapter fails Patrice Chotard <patrice.chotard@st.com> - 2016-08-10 22:30 +0200

csiph-web