summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-06-20 16:12:37 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-14 08:01:13 +0200
commit3204bd0c8b982f2d60bce8ef0943ae7a830f5a4e (patch)
treedd73a40505f82937506d336c6c0fd47cb6a6b4e3
parent26a202b539837cb948345f4a5f1d7000cbd9c2cd (diff)
downloadlinux-stable-3204bd0c8b982f2d60bce8ef0943ae7a830f5a4e.tar.gz
linux-stable-3204bd0c8b982f2d60bce8ef0943ae7a830f5a4e.tar.bz2
linux-stable-3204bd0c8b982f2d60bce8ef0943ae7a830f5a4e.zip
coresight: Potential uninitialized variable in probe()
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>
-rw-r--r--drivers/hwtracing/coresight/coresight-funnel.c1
1 files changed, 1 insertions, 0 deletions
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))