From: Greg Kroah-Hartman Date: Mon, 14 Oct 2019 15:03:59 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v4.4.197~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12941df1025669f70b00359107e010a0b7efe8cf;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: iio-adc-ad799x-fix-probe-error-handling.patch staging-vt6655-fix-memory-leak-in-vt6655_probe.patch --- diff --git a/queue-4.9/iio-adc-ad799x-fix-probe-error-handling.patch b/queue-4.9/iio-adc-ad799x-fix-probe-error-handling.patch new file mode 100644 index 00000000000..469525ddb4b --- /dev/null +++ b/queue-4.9/iio-adc-ad799x-fix-probe-error-handling.patch @@ -0,0 +1,39 @@ +From c62dd44901cfff12acc5792bf3d2dec20bcaf392 Mon Sep 17 00:00:00 2001 +From: Marco Felsch +Date: Tue, 17 Sep 2019 18:09:23 +0200 +Subject: iio: adc: ad799x: fix probe error handling + +From: Marco Felsch + +commit c62dd44901cfff12acc5792bf3d2dec20bcaf392 upstream. + +Since commit 0f7ddcc1bff1 ("iio:adc:ad799x: Write default config on probe +and reset alert status on probe") the error path is wrong since it +leaves the vref regulator on. Fix this by disabling both regulators. + +Fixes: 0f7ddcc1bff1 ("iio:adc:ad799x: Write default config on probe and reset alert status on probe") +Signed-off-by: Marco Felsch +Reviewed-by: Alexandru Ardelean +Cc: +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/adc/ad799x.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/iio/adc/ad799x.c ++++ b/drivers/iio/adc/ad799x.c +@@ -817,10 +817,10 @@ static int ad799x_probe(struct i2c_clien + + ret = ad799x_write_config(st, st->chip_config->default_config); + if (ret < 0) +- goto error_disable_reg; ++ goto error_disable_vref; + ret = ad799x_read_config(st); + if (ret < 0) +- goto error_disable_reg; ++ goto error_disable_vref; + st->config = ret; + + ret = iio_triggered_buffer_setup(indio_dev, NULL, diff --git a/queue-4.9/series b/queue-4.9/series index 3cf47924fd4..f40f58fd020 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -71,3 +71,5 @@ usb-legousbtower-fix-deadlock-on-disconnect.patch usb-legousbtower-fix-potential-null-deref-on-disconnect.patch usb-legousbtower-fix-open-after-failed-reset-request.patch usb-legousbtower-fix-use-after-free-on-release.patch +staging-vt6655-fix-memory-leak-in-vt6655_probe.patch +iio-adc-ad799x-fix-probe-error-handling.patch diff --git a/queue-4.9/staging-vt6655-fix-memory-leak-in-vt6655_probe.patch b/queue-4.9/staging-vt6655-fix-memory-leak-in-vt6655_probe.patch new file mode 100644 index 00000000000..fc69a919356 --- /dev/null +++ b/queue-4.9/staging-vt6655-fix-memory-leak-in-vt6655_probe.patch @@ -0,0 +1,37 @@ +From 80b15db5e1e9c3300de299b2d43d1aafb593e6ac Mon Sep 17 00:00:00 2001 +From: Navid Emamdoost +Date: Fri, 4 Oct 2019 15:03:15 -0500 +Subject: staging: vt6655: Fix memory leak in vt6655_probe + +From: Navid Emamdoost + +commit 80b15db5e1e9c3300de299b2d43d1aafb593e6ac upstream. + +In vt6655_probe, if vnt_init() fails the cleanup code needs to be called +like other error handling cases. The call to device_free_info() is +added. + +Fixes: 67013f2c0e58 ("staging: vt6655: mac80211 conversion add main mac80211 functions") +Signed-off-by: Navid Emamdoost +Cc: stable +Link: https://lore.kernel.org/r/20191004200319.22394-1-navid.emamdoost@gmail.com +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/vt6655/device_main.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/staging/vt6655/device_main.c ++++ b/drivers/staging/vt6655/device_main.c +@@ -1673,8 +1673,10 @@ vt6655_probe(struct pci_dev *pcid, const + + priv->hw->max_signal = 100; + +- if (vnt_init(priv)) ++ if (vnt_init(priv)) { ++ device_free_info(priv); + return -ENODEV; ++ } + + device_print_info(priv); + pci_set_drvdata(pcid, priv);