]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commite3c404fbcb511ae694d270b358cf869007c9ba56
tree7cbf9de97f8c8883eb04ab246b4520cc1f15d69d
parent982a98730e8e3520e365156b21b9015945019221
iio: sca3000: Fix an error handling path in 'sca3000_probe()'

BugLink: http://bugs.launchpad.net/bugs/1807469
commit 4a5b45383ca371e123ba103d34d4b3b87616245c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/iio/accel/sca3000.c