mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
iio: core: Clean up device correctly on iio_device_alloc() failure
[ Upstream commitb0e6871415] Once we called device_initialize() we have to call put_device() on it. Refactor the code to make it in the right order. Fixes:fe6f45f6ba("iio: core: check return value when calling dev_set_name()") Fixes:847ec80bba("Staging: IIO: core support for device registration and management") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
97d817c114
commit
e1cc8886b6
1 changed files with 5 additions and 5 deletions
Loading…
Add table
Add a link
Reference in a new issue