From patchwork Wed Sep 14 10:55:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9331179 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0D30E6077A for ; Wed, 14 Sep 2016 10:56:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F290F29C85 for ; Wed, 14 Sep 2016 10:56:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E750729C87; Wed, 14 Sep 2016 10:56:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94D6929C85 for ; Wed, 14 Sep 2016 10:56:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759239AbcINK43 (ORCPT ); Wed, 14 Sep 2016 06:56:29 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36570 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754281AbcINK42 (ORCPT ); Wed, 14 Sep 2016 06:56:28 -0400 Received: by mail-pf0-f196.google.com with SMTP id n24so620059pfb.3; Wed, 14 Sep 2016 03:56:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=svpEEugC0kX5Xr08UAr9VUTIr9OkrH8RHMptGGY/h7w=; b=ufhGc13grXDFpBrokFwjai4c4ygfcWmqnd+71UAUPbARlYAbhG0VGi3ER9cCZQEM1a 7T9k/MxB8Q3iRiuwZ6E1dvKPbv+WwfMCvWKTDjpsbxYK/v6hd6iuHXky7EAEDpYhj+dM Kb7j7q8hbm64xsHVJTBarUIoaqh6k5kxzAiNIyTPB+1v+vskngi3JU7fcjL4Q/Pmqz3P KJ9Ugnkdl5Qvge1qeYS9ezr/EjM34oGmxdY/3aPz7qyZYxPlwu1l9gg/TnMuREq5OsUs CUxlBu/aCJofP7tlJmBkyejAAYbq3cEozHxTEY2acy0cjsYanKjhr802nywZUfD8Z2kJ 9kqw== 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:in-reply-to :references; bh=svpEEugC0kX5Xr08UAr9VUTIr9OkrH8RHMptGGY/h7w=; b=SEwRU3sB5mCt+70XtbAdbXddAaxVngI5zK2jndz5PJnI96e+vHAr4BA5u1MtDnUvZM RsQDw56MEMNcLNPvvk+yLGXjh4DE+Vf8mug7eZ/OE3K5VYhuk5XhGFAW5/lUeP3r6nK7 dcYtWIL5Z/E+k7+zQoTuNKWSx/rsYkHJzBcDbOHPMOTDNc6LrliAENS+v33liZtPb4jZ CK/NnZ4tUwVkHfduFmFrPObEegDEeYxs1yfmSxLM+clXWl91OL7e6kGghLQSsTZrLs/v CQ9LxQaToOQHagTIMhYLwNczoYHZWWHojICzDu29wqr6dtfryWj5bKEDlanwJxXqVFLO BhgA== X-Gm-Message-State: AE9vXwOuVuG6yletM1IiS7WfT5JBGRDbjTycVpqS1LAmGfkeBpzEMM57/WxVp8bJ5x8OqA== X-Received: by 10.98.79.213 with SMTP id f82mr3393143pfj.64.1473850587983; Wed, 14 Sep 2016 03:56:27 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.symbol.com ([140.101.159.242]) by smtp.googlemail.com with ESMTPSA id t16sm10251026pfj.76.2016.09.14.03.56.25 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Sep 2016 03:56:27 -0700 (PDT) From: Arvind Yadav X-Google-Original-From: Arvind Yadav To: sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Arvind Yadav Subject: [PATCH] power: reset: xgene-reboot: Unmap region obtained by of_iomap Date: Wed, 14 Sep 2016 16:25:39 +0530 Message-Id: <1473850539-15721-1-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Arvind Yadav Free memory mapping, if probe is not successful. Signed-off-by: Arvind Yadav --- drivers/power/reset/xgene-reboot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/power/reset/xgene-reboot.c b/drivers/power/reset/xgene-reboot.c index f07e93c..73c3d93 100644 --- a/drivers/power/reset/xgene-reboot.c +++ b/drivers/power/reset/xgene-reboot.c @@ -81,8 +81,10 @@ static int xgene_reboot_probe(struct platform_device *pdev) ctx->restart_handler.notifier_call = xgene_restart_handler; ctx->restart_handler.priority = 128; err = register_restart_handler(&ctx->restart_handler); - if (err) + if (err) { + iounmap(ctx->csr); dev_err(dev, "cannot register restart handler (err=%d)\n", err); + } return err; }