Files
linux/drivers/iio/adc
Claudiu Beznea c69e13965f iio: adc: rzg2l_adc: Set driver data before enabling runtime PM
When stress-testing the system by repeatedly unbinding and binding the ADC
device in a loop, and the ADC is a supplier for another device (e.g., a
thermal hardware block that reads temperature through the ADC), it may
happen that the ADC device is runtime-resumed immediately after runtime PM
is enabled, triggered by its consumer. At this point, since drvdata is not
yet set and the driver's runtime PM callbacks rely on it, a crash can
occur. To avoid this, set drvdata just after it was allocated.

Fixes: 89ee8174e8 ("iio: adc: rzg2l_adc: Simplify the runtime PM code")
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20250810123328.800104-3-claudiu.beznea.uj@bp.renesas.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16 14:52:43 +01:00
..
2025-04-22 19:10:04 +01:00
2025-06-09 07:45:35 +01:00
2025-03-11 19:08:56 +00:00
2025-04-22 19:10:04 +01:00
2024-11-03 20:33:44 +00:00
2025-06-26 19:32:52 +01:00
2025-04-22 19:10:04 +01:00
2024-09-30 09:21:02 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00