iio: sca3000: Fix an error handling path in 'sca3000_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 8 Apr 2018 19:44:01 +0000 (21:44 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 15 Apr 2018 19:15:55 +0000 (20:15 +0100)
commit4a5b45383ca371e123ba103d34d4b3b87616245c
treee92925f2dc34b483ad87c77a5fbe6f9502389035
parent4177381b440130ccb686712aaa09b45539114698
iio: sca3000: Fix an error handling path in 'sca3000_probe()'

Use 'devm_iio_kfifo_allocate()' instead of 'iio_kfifo_allocate()' in order
to simplify code and avoid a memory leak in an error path in
'sca3000_probe()'. A call to 'sca3000_unconfigure_ring()' was missing.

Sent via the next merge window as unimportant bug and there are
other patches dependent on it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/sca3000.c