Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

io:core: In iio_map_array_register() cleanup in case of error

In function iio_map_array_register() properly rewind in case of error.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/1606571059-13974-2-git-send-email-LinoSanfilippo@gmx.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Lino Sanfilippo and committed by
Jonathan Cameron
34fce6ca cc9fb60e

+2
+2
drivers/iio/inkern.c
··· 60 60 i++; 61 61 } 62 62 error_ret: 63 + if (ret) 64 + iio_map_array_unregister_locked(indio_dev); 63 65 mutex_unlock(&iio_map_list_lock); 64 66 65 67 return ret;