summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-05-25 15:51:48 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-05-25 15:51:47 -0700
commit768b5c4389c067df39f3bf7e230020f4bd969b81 (patch)
tree9818371d2c25ab7b44db47658487bf055df15e02 /drivers/soc
parent207cc877c1dc7b9ca08cb0624ccfc738b13f30af (diff)
parentd4d2b1a9c3e69992cdc14e04105d622180feca9e (diff)
Merge "soc: qcom: Fix failure prints in rpm stats and log"
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/rpm_log.c7
-rw-r--r--drivers/soc/qcom/rpm_stats.c11
2 files changed, 11 insertions, 7 deletions
diff --git a/drivers/soc/qcom/rpm_log.c b/drivers/soc/qcom/rpm_log.c
index deea77c6b0a9..66844565dde0 100644
--- a/drivers/soc/qcom/rpm_log.c
+++ b/drivers/soc/qcom/rpm_log.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, 2013-2014, The Linux Foundation.
+/* Copyright (c) 2010-2011, 2013-2014, 2017, The Linux Foundation.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -345,8 +345,9 @@ static int msm_rpm_log_probe(struct platform_device *pdev)
/* Remap the rpm-log pointer */
phys_ptr = ioremap_nocache(offset->start, SZ_4);
if (!phys_ptr) {
- pr_err("%s: Failed to ioremap address: %x\n",
- __func__, offset_addr);
+ pr_err("%s: Failed to ioremap address: %pa\n",
+ __func__, &offset->start);
+ kfree(pdata);
return -ENODEV;
}
offset_addr = readl_relaxed(phys_ptr);
diff --git a/drivers/soc/qcom/rpm_stats.c b/drivers/soc/qcom/rpm_stats.c
index dacca0efe231..8f3094853ba3 100644
--- a/drivers/soc/qcom/rpm_stats.c
+++ b/drivers/soc/qcom/rpm_stats.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -462,8 +462,10 @@ static int msm_rpmstats_probe(struct platform_device *pdev)
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
"phys_addr_base");
- if (!res)
+ if (!res) {
+ kfree(pdata);
return -EINVAL;
+ }
offset = platform_get_resource_byname(pdev, IORESOURCE_MEM,
"offset_addr");
@@ -471,8 +473,9 @@ static int msm_rpmstats_probe(struct platform_device *pdev)
/* Remap the rpm-stats pointer */
phys_ptr = ioremap_nocache(offset->start, SZ_4);
if (!phys_ptr) {
- pr_err("%s: Failed to ioremap address: %x\n",
- __func__, offset_addr);
+ pr_err("%s: Failed to ioremap address: %pa\n",
+ __func__, &offset->start);
+ kfree(pdata);
return -ENODEV;
}
offset_addr = readl_relaxed(phys_ptr);