Re: [PATCH 2/4] i2c: rcar: enable RuntimePM before registering to the core
From: Geert Uytterhoeven
Date: Fri Oct 09 2015 - 04:46:31 EST
Hi Wolfram,
On Fri, Oct 9, 2015 at 8:54 AM, Wolfram Sang <wsa@xxxxxxxxxxxxx> wrote:
> The core may register clients attached to this master which may use
> funtionality from the master. So, RuntimePM must be enabled before, otherwise
> this will fail. While here, move drvdata, too.
Thanks for your patch!
> Reported-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> ---
> drivers/i2c/busses/i2c-rcar.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
> index d8361dada58455..3d7536d78cb366 100644
> --- a/drivers/i2c/busses/i2c-rcar.c
> +++ b/drivers/i2c/busses/i2c-rcar.c
> @@ -690,15 +690,15 @@ static int rcar_i2c_probe(struct platform_device *pdev)
> return ret;
> }
>
> + pm_runtime_enable(dev);
> + platform_set_drvdata(pdev, priv);
> +
> ret = i2c_add_numbered_adapter(adap);
> if (ret < 0) {
> dev_err(dev, "reg adap failed: %d\n", ret);
You forgot to call pm_runtime_disable() in the error path.
I think some of your other patches suffer from the same issue.
> return ret;
> }
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/