From patchwork Wed Sep 14 11:05:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9331187 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 D30F160231 for ; Wed, 14 Sep 2016 11:06:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C429729C96 for ; Wed, 14 Sep 2016 11:06:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B876829CA0; Wed, 14 Sep 2016 11:06:21 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 64CCE29C96 for ; Wed, 14 Sep 2016 11:06:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755489AbcINLGS (ORCPT ); Wed, 14 Sep 2016 07:06:18 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33491 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750975AbcINLGS (ORCPT ); Wed, 14 Sep 2016 07:06:18 -0400 Received: by mail-pf0-f194.google.com with SMTP id 128so638086pfb.0; Wed, 14 Sep 2016 04:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:cc:subject:date; bh=K4K3jH+SEJHYnyKm8NqdOHbENEa40vQoT2Hxp39cVK0=; b=UfJrrb70at+BMqnEnrrSLEzmsGoyDENbkLxvkRRgkaGoAy96hktYt1R57hsNXcLIAK pOqwaGq6AxUzvvX9K3tN+Mv0zMZf456TpNSrwX2trUkVuM62qnPH6ZApxzi7uXhk7QDF 5AvrVZG/TOkY553HSoyV7c/H6JpPQuN3gNv4HgrRPq1oyZWbNRmKpPr81VLdRwNZ+cWi a8+c4PWBmLJw2zXtTTlBt792nDUpwMpx1G8oMnxR4QdJciScOQfZQsxey0citcDPi7+I G4msuQ2jOHHrgpOHIyGagOfRicsKP/Rq6tgGR2wruJxn48RytHAJsBTZUPhiJxRwcIZ1 NbcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:from:to:cc:subject:date; bh=K4K3jH+SEJHYnyKm8NqdOHbENEa40vQoT2Hxp39cVK0=; b=FLxkJwLvywFZBYi7jNE+0J3wjm5vE/uYh4YFi9ARU+LdNTgOmoKi+wVyU9Yz0iZge+ sQME7AdyirxdDh9WfP/SyJRDs7b1UZTyJzg8KSHF5ZCQEwxVLAFMjrUMgsaSwjAi9w0+ XigYonTTJdXaws4ADA1595IE57fDejFS/RJYv2el95QeBUK+pKAtl5N6geJce6uKEGO9 bx46DlXIqYnIk7wNaY9dGet2rawMU17NtmoVI/g1SQS8PE7upvMaRos0QLyo3JO/xmsT f1LTxeybDZMtjX5ekZkzDFM7WsKfvvxXuJ9AfqmnuZsTajwwUcJ11m5R5HpkV3oZO8+1 O+aw== X-Gm-Message-State: AE9vXwMi1ZHKiS3NT/3C057hyNhEHg3pwN4p2f/545OgMt/1IQe62YonFrOvWuj8rIHfjA== X-Received: by 10.98.98.193 with SMTP id w184mr3391194pfb.120.1473851177205; Wed, 14 Sep 2016 04:06:17 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.symbol.com ([140.101.159.242]) by smtp.googlemail.com with ESMTPSA id s7sm37468065pfk.11.2016.09.14.04.06.14 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Sep 2016 04:06:16 -0700 (PDT) Message-ID: <57d92f28.8796620a.e4584.df58@mx.google.com> X-Google-Original-Message-ID: <1473851131-15924-1-git-send-email-y> From: arvind.yadav.cs@gmail.com X-Google-Original-From: y 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: zx-reboot: Unmap region obtained by of_iomap Date: Wed, 14 Sep 2016 16:35:31 +0530 X-Mailer: git-send-email 1.7.9.5 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/zx-reboot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/power/reset/zx-reboot.c b/drivers/power/reset/zx-reboot.c index a5b0096..b0b1eb3 100644 --- a/drivers/power/reset/zx-reboot.c +++ b/drivers/power/reset/zx-reboot.c @@ -58,9 +58,12 @@ static int zx_reboot_probe(struct platform_device *pdev) } err = register_restart_handler(&zx_restart_nb); - if (err) + if (err) { + iounmap(base); + iounmap(pcu_base); dev_err(&pdev->dev, "Register restart handler failed(err=%d)\n", err); + } return err; }