]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
iio: adc: imx25-gcq: Fix leak of device_node in mx25_gcq_setup_cfgs()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 21 Sep 2018 21:58:02 +0000 (00:58 +0300)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:57:27 +0000 (19:57 -0600)
commit1e725d70e576a497202c52960f010443c72e26cc
treecf2e8a4213c153155255645f7c9872a983d32aab
parent5e4c1c3e1add30a3b4d8d79f0cad97d1c3e8471f
iio: adc: imx25-gcq: Fix leak of device_node in mx25_gcq_setup_cfgs()

BugLink: https://bugs.launchpad.net/bugs/1836802
commit d3fa21c73c391975488818b085b894c2980ea052 upstream.

Leaving for_each_child_of_node loop we should release child device node,
if it is not stored for future use.

Found by Linux Driver Verification project (linuxtesting.org).

JC: I'm not sending this as a quick fix as it's been wrong for years,
but good to pick up for stable after the merge window.

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Fixes: 6df2e98c3ea56 ("iio: adc: Add imx25-gcq ADC driver")
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: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/iio/adc/fsl-imx25-gcq.c