Update rzv2m_i2c_probe() for the confirmed driver lifecycle defect.
Keep the change limited to the concrete operation shown in the final
patch.
Signed-off-by: jiawen <1298662399@qq.com>
---
diff --git a/drivers/i2c/busses/i2c-rzv2m.c b/drivers/i2c/busses/i2c-rzv2m.c
--- a/drivers/i2c/busses/i2c-rzv2m.c
+++ b/drivers/i2c/busses/i2c-rzv2m.c
@@ -461,7 +461,12 @@
pm_runtime_enable(dev);
- pm_runtime_get_sync(dev);
+ ret = pm_runtime_get_sync(dev);
+ if (ret < 0) {
+ pm_runtime_put_noidle(dev);
+ return ret;
+ }
+
rzv2m_i2c_init(priv);
pm_runtime_put(dev);
Hi Jiawen,
Thanks for your patch!
On Tue, 18 Aug 2026 at 15:21, Jiawen Liu <1298662399@qq.com> wrote:
> Update rzv2m_i2c_probe() for the confirmed driver lifecycle defect.
>
> Keep the change limited to the concrete operation shown in the final
> patch.
Please write a better patch description.
> Signed-off-by: jiawen <1298662399@qq.com>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
Hi Jiawen,
On Tue, Aug 18, 2026 at 05:15:01PM +0400, Jiawen Liu wrote:
> Update rzv2m_i2c_probe() for the confirmed driver lifecycle defect.
>
> Keep the change limited to the concrete operation shown in the final
> patch.
>
> Signed-off-by: jiawen <1298662399@qq.com>
> ---
> diff --git a/drivers/i2c/busses/i2c-rzv2m.c b/drivers/i2c/busses/i2c-rzv2m.c
> --- a/drivers/i2c/busses/i2c-rzv2m.c
> +++ b/drivers/i2c/busses/i2c-rzv2m.c
> @@ -461,7 +461,12 @@
>
> pm_runtime_enable(dev);
>
> - pm_runtime_get_sync(dev);
> + ret = pm_runtime_get_sync(dev);
> + if (ret < 0) {
> + pm_runtime_put_noidle(dev);
> + return ret;
> + }
Please, consider using managed resources.
Thanks,
Andi
© 2016 - 2026 Red Hat, Inc.