]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: light: veml6030: power off device in probe error paths
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Tue, 1 Oct 2024 20:21:20 +0000 (22:21 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 6 Oct 2024 14:09:35 +0000 (15:09 +0100)
commite980726d89e25eb87dd80803ec75feefede21045
treea06daa85d821c24fec87b710a3620b4da6d24a9b
parented59fc90f38a751f699a846bc68a89185fb8325d
iio: light: veml6030: power off device in probe error paths

Move devm_add_action_or_reset() with a device shut down action to the
hardware initialization function to ensure that any error path after
powering on the device leads to a power off. Add struct device *dev
to the argument list to clarify the device the action is registered
against, and use it wherever &client->dev was used.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20241001-veml6035-v3-7-d789f6ff147c@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/veml6030.c