Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-07-14 11:33:41 +0200
committerJiri Slaby <jslaby@suse.cz>2019-07-14 11:33:53 +0200
commit5fa94454aa6c7d468978b78605b447b6a0896a95 (patch)
tree34d0b0ff7252eaa9cd91773e264c1af7f380f3d0
parentc676a9d47332d41331c298e42aec0356aee17815 (diff)
coresight: Potential uninitialized variable in probe()
-rw-r--r--patches.kernel.org/5.2.1-044-coresight-Potential-uninitialized-variable-in-p.patch39
-rw-r--r--series.conf1
2 files changed, 40 insertions, 0 deletions
diff --git a/patches.kernel.org/5.2.1-044-coresight-Potential-uninitialized-variable-in-p.patch b/patches.kernel.org/5.2.1-044-coresight-Potential-uninitialized-variable-in-p.patch
new file mode 100644
index 0000000000..0dbf63bf6e
--- /dev/null
+++ b/patches.kernel.org/5.2.1-044-coresight-Potential-uninitialized-variable-in-p.patch
@@ -0,0 +1,39 @@
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Thu, 20 Jun 2019 16:12:37 -0600
+Subject: [PATCH] coresight: Potential uninitialized variable in probe()
+References: bnc#1012628
+Patch-mainline: 5.2.1
+Git-commit: 0530ef6b41e80c5cc979e0e50682302161edb6b7
+
+commit 0530ef6b41e80c5cc979e0e50682302161edb6b7 upstream.
+
+The "drvdata->atclk" clock is optional, but if it gets set to an error
+pointer then we're accidentally return an uninitialized variable instead
+of success.
+
+Fixes: 78e6427b4e7b ("coresight: funnel: Support static funnel")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20190620221237.3536-6-mathieu.poirier@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/hwtracing/coresight/coresight-funnel.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c
+index 16b0c0e1e43a..ad6e16c96263 100644
+--- a/drivers/hwtracing/coresight/coresight-funnel.c
++++ b/drivers/hwtracing/coresight/coresight-funnel.c
+@@ -241,6 +241,7 @@ static int funnel_probe(struct device *dev, struct resource *res)
+ }
+
+ pm_runtime_put(dev);
++ ret = 0;
+
+ out_disable_clk:
+ if (ret && !IS_ERR_OR_NULL(drvdata->atclk))
+--
+2.22.0
+
diff --git a/series.conf b/series.conf
index d37d516d99..7ab4f9c801 100644
--- a/series.conf
+++ b/series.conf
@@ -70,6 +70,7 @@
patches.kernel.org/5.2.1-041-binder-fix-memory-leak-in-error-path.patch
patches.kernel.org/5.2.1-042-binder-return-errors-from-buffer-copy-functions.patch
patches.kernel.org/5.2.1-043-iio-adc-stm32-adc-add-missing-vdda-supply.patch
+ patches.kernel.org/5.2.1-044-coresight-Potential-uninitialized-variable-in-p.patch
########################################################
# Build fixes that apply to the vanilla kernel too.