From patchwork Thu Sep 8 17:38:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zhong X-Patchwork-Id: 9321857 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 F12CC60752 for ; Thu, 8 Sep 2016 17:40:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F28AE2997A for ; Thu, 8 Sep 2016 17:40:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6A302997C; Thu, 8 Sep 2016 17:40:54 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 8541F2997A for ; Thu, 8 Sep 2016 17:40:54 +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 1bi3Hj-0008SD-Ip; Thu, 08 Sep 2016 17:38:47 +0000 Received: from mail-pa0-f65.google.com ([209.85.220.65]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bi3Hd-0008PK-JU; Thu, 08 Sep 2016 17:38:42 +0000 Received: by mail-pa0-f65.google.com with SMTP id ez1so2651759pab.3; Thu, 08 Sep 2016 10:38:21 -0700 (PDT) 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=nmbEQNKaROGEDkSrEIJissS+o8BMfGSbWStkf2vUkQQ=; b=Vo4YR3OahHq6gNku2uspGzFoVL4zbeZe5IOoDb1BhbhGdVhbzU+4yXwTi0qNodZflm Siykha/kpswVRBK9XNJvwHDOG6TcLs4dphvCUlBTna5r2lq1UHmgIRTmfdMQcGGI9UGS EtwbDiOpX/xq8LlWBHRVhgaNW8ZBratGueU68SZ6eCJkd33yLAeJlUB1LALN3A9pxU8Z tBepquyx8npNolFyeBxY2lgONFsN21cpYbgPwRNqvEyfocN7N3D8xXEaKa3qgnEjudlP eJiZHNiAXIM+Sb9OreSIno3NRVTMDsf/nd+Bgp0VBbSXMj0eOVJNqoTXahGqEWZg5rL7 YV/w== X-Gm-Message-State: AE9vXwNL2mffzIrY65W3Nw9bWvciH7ps1vgZX2jQ4wMR3jkefO/2uZ4icxG6/7IAqxe0Hw== X-Received: by 10.67.7.170 with SMTP id dd10mr1420331pad.152.1473356300764; Thu, 08 Sep 2016 10:38:20 -0700 (PDT) Received: from user5-HP-Z620-Workstation.corp.google.com ([172.22.52.170]) by smtp.gmail.com with ESMTPSA id y3sm57753120pfy.36.2016.09.08.10.38.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Sep 2016 10:38:19 -0700 (PDT) From: Chris Zhong To: kishon@ti.com, groeck@chromium.org, wulf@rock-chips.com, briannorris@chromium.org, heiko@sntech.de, dianders@chromium.org, kever.yang@rock-chips.com Subject: [PATCH] phy: rockchip-typec: add pm_runtime_disable in err case Date: Thu, 8 Sep 2016 10:38:11 -0700 Message-Id: <1473356291-19247-1-git-send-email-zyw@rock-chips.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160908_103841_718980_CA191AB9 X-CRM114-Status: UNSURE ( 8.49 ) X-CRM114-Notice: Please train this message. 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: Chris Zhong , linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 Add pm_runtime_disable in err case to make the pm_runtime_enable/disable is invoked balanced. Signed-off-by: Chris Zhong Reviewed-by: Brian Norris Reviewed-by: Douglas Anderson --- drivers/phy/phy-rockchip-typec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/phy/phy-rockchip-typec.c b/drivers/phy/phy-rockchip-typec.c index 7cfb0f8..dd257c7 100644 --- a/drivers/phy/phy-rockchip-typec.c +++ b/drivers/phy/phy-rockchip-typec.c @@ -977,6 +977,7 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev) if (IS_ERR(phy)) { dev_err(dev, "failed to create phy: %s\n", child_np->name); + pm_runtime_disable(dev); return PTR_ERR(phy); } @@ -986,6 +987,7 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev) phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); if (IS_ERR(phy_provider)) { dev_err(dev, "Failed to register phy provider\n"); + pm_runtime_disable(dev); return PTR_ERR(phy_provider); }