diff options
| author | Aldo Conte <aldocontelk@gmail.com> | 2026-05-22 14:34:12 +0200 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-05-31 11:01:47 +0100 |
| commit | b39f3bb9f5580d19bc0c10dea9224d75fed45f1d (patch) | |
| tree | ebfea67dbe0d92970c28e6085ac323e4fb190981 /rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git | |
| parent | f1cb3d3afd1024269ec1887a36b28efd9ea849a3 (diff) | |
iio: tcs3472: power down chip on probe failure
If tcs3472_probe() fails after enabling the chip (by writing PON | AEN
to the ENABLE register), the error paths return without powering down
the device.
Add an 'error_powerdown' label at the end of the cleanup chain that
calls tcs3472_powerdown() to power down the chip. The existing label
cascade is rerouted to fall through to the new label.
Move tcs3472_powerdown() above tcs3472_probe() so the probe can call
it without a forward declaration.
Found by code inspection while reviewing the probe error paths in
preparation for the devm_ conversion.
Fixes: eb869ade30a6 ("iio: Add tcs3472 color light sensor driver")
Signed-off-by: Aldo Conte <aldocontelk@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
