Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18aa6c7f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: Fix uninitialized variables and prints in rpm stats and log"

parents e90816fa 939a646b
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
/* 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);
+5 −5
Original line number Diff line number Diff line
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015, 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
@@ -220,11 +220,11 @@ static const struct file_operations msm_rpm_rail_stats_fops = {
static int msm_rpm_rail_stats_probe(struct platform_device *pdev)
{
	struct dentry *dent;
	struct msm_rpm_rail_stats_platform_data *pdata;
	struct msm_rpm_rail_stats_platform_data *pdata = NULL;
	struct resource *res;
	struct resource *offset;
	struct device_node *node;
	uint32_t offset_addr;
	uint32_t offset_addr = 0;
	void __iomem *phys_ptr;

	if (!pdev)
@@ -242,8 +242,8 @@ static int msm_rpm_rail_stats_probe(struct platform_device *pdev)

	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);
		return -ENODEV;
	}
	offset_addr = readl_relaxed(phys_ptr);
+7 −4
Original line number Diff line number Diff line
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2015, 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
@@ -464,8 +464,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");
@@ -473,8 +475,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);