diff options
| author | Salah Triki <salah.triki@gmail.com> | 2026-02-21 10:32:42 +0300 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2026-02-23 23:44:31 +0300 |
| commit | 12b393486c707dc005540da58f6c7a60776941ac (patch) | |
| tree | d668d5ebc1a691e565592a12aa981eca640fb00d /include/linux/trace_recursion.h | |
| parent | d1e13ac7c2641a8ec815a9fe10835726eaf05302 (diff) | |
| download | linux-12b393486c707dc005540da58f6c7a60776941ac.tar.xz | |
iio: core: Clean up device correctly on viio_trigger_alloc() failure
Move device_initialize() after all error paths in viio_trigger_alloc().
Previously, put_device() should have been called on all error paths after
device_initialize(), but that was not done.
Rather than adding put_device(), move device_initialize() to avoid
needing to unwind it on error.
In addition move trig->dev initialization to just before device_initialize()
to related code together.
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/trace_recursion.h')
0 files changed, 0 insertions, 0 deletions
