Re: [PATCH] i2c: sprd: Delete i2c adapter in .remove's error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	Hi Andy,

Just noticed this patch is being backported to stable...

On Thu, 9 Mar 2023, Andy Shevchenko wrote:
On Thu, Mar 9, 2023 at 11:58 AM Uwe Kleine-König
<u.kleine-koenig@xxxxxxxxxxxxxx> wrote:

If pm runtime resume fails the .remove callback used to exit early. This
resulted in an error message by the driver core but the device gets
removed anyhow. This lets the registered i2c adapter stay around with an
unbound parent device.

So only skip clk disabling if resume failed, but do delete the adapter.

Still worrisome. I would disable clock independently, but the questions are:
1) why the heck we need this dance with PM runtime for disabling clocks;

Exactly. There is no point in calling pm_runtime_get_sync() and
pm_runtime_put_noidle() here, as no hardware is accessed in between,
is it?

2) why can't we use devm_clk_get_enabled() or so in the probe;
?

Because that helper didn't exist when this driver was introduced ;-)

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

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux