From patchwork Wed Sep 21 15:08:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9343711 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 AA38F6077A for ; Wed, 21 Sep 2016 15:11:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AB942A61D for ; Wed, 21 Sep 2016 15:11:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F4AA2A74A; Wed, 21 Sep 2016 15:11:08 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D0CA42A75C for ; Wed, 21 Sep 2016 15:11:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bmj9M-00058D-Av; Wed, 21 Sep 2016 15:09:28 +0000 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bmj8y-0004wM-7b; Wed, 21 Sep 2016 15:09:08 +0000 Received: by mail-pf0-x243.google.com with SMTP id 21so2518255pfy.1; Wed, 21 Sep 2016 08:08:43 -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:mime-version :content-transfer-encoding; bh=pY5fG27T0Bz7nUhUfLb7SjoBquqq37nYPcUyPrivhag=; b=ABWDn0mIUA5uxkIhhKObkK5hD84RoOmwFfMrElK2LyWULCaGAScxF8qA8PoJTRk/JW hhx7UN4r/mO+yv753rS0IJtG358M47B27DQlRHIjCETFU3j8Cjhd9+E9jET/PRLvKmIv saXNAeRpYNR1hPXrn5+JwYIwRSHDhFMKfoUoHzfm7HZ4v61tTemwfyMtN9vd5KbEkFL6 2llTna94anNyZBS8nzOL/0qrKY0gDHPCg8pjVgw5j8dglIH367ViVAZMciRe4P+L7i5p 3u7RverE1E1846UHkpNzcjmhVPxsZ8OFBoSDNE5zshpbmbm5OKyMyFVao1cBrHjFQaFE WCzQ== 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:mime-version :content-transfer-encoding; bh=pY5fG27T0Bz7nUhUfLb7SjoBquqq37nYPcUyPrivhag=; b=Wqyq0gl3Cz2M5KpdnyDVE3HiA4JAq2J/DCEuva0omzwq7q6kaIzJ/Ske5S39T3VChz uJiQSMYOdQTgqRi9U8Yw5jMvi5x8yWl8rbIYFUw8vOeFwWQd1pw6+U+zzCf72di1gqhk DaHofk8SLinktQKvY1rEsx4jAZeaykZNERyGCmb3QXx7PRSDXX9MUk3+kXLV5IabwbQj LYRki5WqbzkR0R8D2rK17urgt1nMedMb3MdxR63UgS/WtYGvcXAhhifHpuk9uD74twhs S8gEL+/bxNfoDtr2xIec69frvVF/CmvDqpB1sgJSP06F5SPXQyH7mnzwLQdBBTXoac/Q MGkA== X-Gm-Message-State: AE9vXwOHgc7ssdFDtnX97Z5B/3q8NKZ1pYhm59306z4lDnfoWChs0DLq5+Bf8bt7vakPSQ== X-Received: by 10.98.109.66 with SMTP id i63mr65477109pfc.126.1474470523317; Wed, 21 Sep 2016 08:08:43 -0700 (PDT) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id xv9sm47494483pab.36.2016.09.21.08.08.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Sep 2016 08:08:42 -0700 (PDT) From: Wei Yongjun To: Matthias Brugger , Arnd Bergmann , John Crispin , Henry Chen , Sascha Hauer , Daniel Kurtz Subject: [PATCH -next] soc: mediatek: PMIC wrap: fix missing clk_disable_unprepare() on error in pwrap_probe() Date: Wed, 21 Sep 2016 15:08:31 +0000 Message-Id: <1474470511-2458-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160921_080904_337422_EB2A0EB0 X-CRM114-Status: GOOD ( 12.34 ) 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: linux-mediatek@lists.infradead.org, Wei Yongjun , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix the missing clk_disable_unprepare() before return from pwrap_probe() in the error handling case. Signed-off-by: Wei Yongjun --- drivers/soc/mediatek/mtk-pmic-wrap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c index a5f1093..4da3bb2 100644 --- a/drivers/soc/mediatek/mtk-pmic-wrap.c +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c @@ -1200,7 +1200,8 @@ static int pwrap_probe(struct platform_device *pdev) if (!(pwrap_readl(wrp, PWRAP_WACS2_RDATA) & PWRAP_STATE_INIT_DONE0)) { dev_dbg(wrp->dev, "initialization isn't finished\n"); - return -ENODEV; + ret = -ENODEV; + goto err_out2; } /* Initialize watchdog, may not be done by the bootloader */