diff options
author | Maulik Shah <mkshah@codeaurora.org> | 2017-05-18 09:55:59 +0530 |
---|---|---|
committer | Maulik Shah <mkshah@codeaurora.org> | 2017-05-19 09:31:30 +0530 |
commit | d4d2b1a9c3e69992cdc14e04105d622180feca9e (patch) | |
tree | 4b773e19093099fac4f2b1be4b6a1534d3af65e1 /drivers/soc | |
parent | c6d1c1699e7dcc7ec170baae48be94814061d0b7 (diff) |
soc: qcom: Fix failure prints in rpm stats and log
Correct failure prints in rpm stats and rpm log drivers.
Change-Id: I4a2d4a8cf4df4c9c1d750a65beb7454041fc06c2
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/qcom/rpm_log.c | 7 | ||||
-rw-r--r-- | drivers/soc/qcom/rpm_stats.c | 11 |
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); |