From patchwork Mon Feb 22 08:31:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 62475 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1095426lbl; Mon, 22 Feb 2016 00:32:38 -0800 (PST) X-Received: by 10.66.142.226 with SMTP id rz2mr36318507pab.104.1456129957960; Mon, 22 Feb 2016 00:32:37 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id 87si38302872pfl.29.2016.02.22.00.32.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Feb 2016 00:32:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aXlu1-0004f4-2R; Mon, 22 Feb 2016 08:31:33 +0000 Received: from mail-lb0-x22e.google.com ([2a00:1450:4010:c04::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aXlty-0004R8-9q for linux-arm-kernel@lists.infradead.org; Mon, 22 Feb 2016 08:31:31 +0000 Received: by mail-lb0-x22e.google.com with SMTP id x4so78321063lbm.0 for ; Mon, 22 Feb 2016 00:31:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=5DH1MAXAGym6KcNaVG/JIWa+jEexLaWG5iPoJgqGo74=; b=SeNoPxqqY/ocW+0OMOfW6Azreobpt/C5xR1CGmlnctvmkQfFJXPcAmFWQAl88wBK6k K/3GsdV6jrbK0herI1i4vde+ZLJqeUaf+dJ8HOy+mgBA5QzIzmF0N3y6FCfaoNWvsUDH gN/zKt1ZImqv0Edn1CK9wa+RBmq1QUx95Z9wY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5DH1MAXAGym6KcNaVG/JIWa+jEexLaWG5iPoJgqGo74=; b=eiSRrZAvAhYLhkUDYoxCMT5YGP3ODu1i498MhvXHa++Mk3vEy/2lCDSc7ua4WWfmOB TL+bkhGn1aYFiliADKuHlI01oef6yeV4hPIlfVDIbCIJl4LzaTg2k/le0Lv0CxdCyMxf NK8y79EVziGq/xDZbrVlfFqZf//GXrYflqYSP/p1M7lXFPI5bYsweMYaXqjFHwOBhgIp SgGRHnrpPaEES0A32FFqbnLRONcwiF0q9+dWfT+eDHC1Rrx7Q929taFwuUxmG82pxabx 183+3X6kS96oKd/6K6ksFhTcIYMBHNA4s0eSIJ7hqB0qfkzB8mj6FjO6mZJNWj2dBb9X +uvQ== X-Gm-Message-State: AG10YOQWO3t59qe2jjmWxlUwdZPCEnR+a097tR2HWO6kTXUQkI54/Yud0Uicgp0lot9kS8ji X-Received: by 10.112.160.3 with SMTP id xg3mr9649587lbb.67.1456129868077; Mon, 22 Feb 2016 00:31:08 -0800 (PST) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 37sm3171740lfs.3.2016.02.22.00.31.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Feb 2016 00:31:07 -0800 (PST) From: Linus Walleij To: arm@kernel.org Subject: [PATCH] ARM: ux500: fix ureachable iounmap() Date: Mon, 22 Feb 2016 09:31:02 +0100 Message-Id: <1456129862-3918-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160222_003130_659546_80B343B8 X-CRM114-Status: GOOD ( 13.24 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c04:0:0:0:22e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The code was executing a return with a pointer before reaching iounmap(). Reported-by: David Binderman Signed-off-by: Linus Walleij --- ARM SoC folks: I have no other Ux500 patches queued, so can you please apply this patch directly for-next somewhere, thanks. --- arch/arm/mach-ux500/cpu-db8500.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.4.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index a0ffaad1fb61..a557955472ea 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -76,17 +76,19 @@ static struct arm_pmu_platdata db8500_pmu_platdata = { static const char *db8500_read_soc_id(void) { void __iomem *uid; + const char *retstr; uid = ioremap(U8500_BB_UID_BASE, 0x20); if (!uid) return NULL; /* Throw these device-specific numbers into the entropy pool */ add_device_randomness(uid, 0x14); - return kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x", + retstr = kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x", readl((u32 *)uid+0), readl((u32 *)uid+1), readl((u32 *)uid+2), readl((u32 *)uid+3), readl((u32 *)uid+4)); iounmap(uid); + return retstr; } static struct device * __init db8500_soc_device_init(void)