iio: light: cm3605: Fix an error handling path in cm3605_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 7 Aug 2022 06:37:43 +0000 (08:37 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 15 Aug 2022 21:30:40 +0000 (22:30 +0100)
commit160905549e663019e26395ed9d66c24ee2cf5187
tree6b34c3ac41ddcf9de79b1cbc99e94911d06b50fd
parent8f89e33bf040bbef66386c426198622180233178
iio: light: cm3605: Fix an error handling path in cm3605_probe()

The commit in Fixes also introduced a new error handling path which should
goto the existing error handling path.
Otherwise some resources leak.

Fixes: 0d31d91e6145 ("iio: light: cm3605: Make use of the helper function dev_err_probe()")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/0e186de2c125b3e17476ebf9c54eae4a5d66f994.1659854238.git.christophe.jaillet@wanadoo.fr
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/cm3605.c