Received: by 10.223.176.5 with SMTP id f5csp1031158wra; Fri, 2 Feb 2018 10:00:59 -0800 (PST) X-Google-Smtp-Source: AH8x2250xg/p+zjaEgvBHSiUA754SfHU7y5A+F9eT/XmZoWwjAa/WNQz1hZHX5urIwUXd9PSJ2MP X-Received: by 10.99.116.9 with SMTP id p9mr1872923pgc.437.1517594459719; Fri, 02 Feb 2018 10:00:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517594459; cv=none; d=google.com; s=arc-20160816; b=y7YDR48c8VkQ1C6fznRewKy4bhJqG6DzqSjpcqQWNo9hA3MS6TQ0KONeP0KlKXF/K3 0VEhJpHYHYyDsEiG1SvK8IjvYAwrCxUf12ofwF4Yn6UM/WE/4CORDfrRd62SiL/DufZF vuvft5PE4bhQWJMg0zRQhLqX8AerW/CBpr6cCBSKsRhLsgzIKzHKcT8jhqhu2UkyM0pZ aFnjiCYFiA9GSJasEJV3/pc9gSMjIqVjVDJwlSdXEUxD/QsL9GMncQMJwOPspsrl4hT+ srVM7d27U8UJ2DYlxj7fjRrRpNkPLeg5pU2Pfd64ZyQnaZ67r1Yk8Y/XFOZQwdgXA7xC 1B2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=2mKk0VdWkOf7X2BEWAazmRFu4bhD12KXpk5GZDgjQ50=; b=aoBGIFG3BTlGt9OkpUDQWQU5Jjhn/arBrU3WlpjObx3LNRv9dO8nub+JFM0SCxPpdO kOlUWDeKWeC61X9z/rCr6gsyMKw/eK+pG60MxdfXZML1n+Pj6dOBHEmBxTuV6I0cBPWo dY3KKoFk4m76ULMmgNGQyPTYYm5azGL9yfrPb2iU4LptGNZSfxhw1neGeoqGJY1t7E0n iWLNtUoUtYE0LFoGTbX663Z+xFn+TtWmGhWFdIiblZQWHgv5Q5D65uYvObWFw/iXGAwH +jygm4CpPocW+gPVnBOrr2OvORI/BtZ0cAMG+H4a/NeAVSUjMzIoo5BVY0adKBXOvEbh iq0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2si1695775pgp.680.2018.02.02.10.00.44; Fri, 02 Feb 2018 10:00:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753444AbeBBR7o (ORCPT + 99 others); Fri, 2 Feb 2018 12:59:44 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38296 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752653AbeBBRKZ (ORCPT ); Fri, 2 Feb 2018 12:10:25 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C6A2FEB3; Fri, 2 Feb 2018 17:10:23 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mirza Krak , Sandy Huang , Sasha Levin Subject: [PATCH 4.14 068/156] drm/rockchip: dw-mipi-dsi: fix possible un-balanced runtime PM enable Date: Fri, 2 Feb 2018 17:57:29 +0100 Message-Id: <20180202140843.370659851@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mirza Krak [ Upstream commit 517f56839f581618d24f2e67a35738a5c6cbaecb ] In the case where the bind gets deferred we would end up with a un-balanced runtime PM enable call. Fix this by simply moving the pm_runtime_enable call to the end of the bind function when all paths have succeeded. Signed-off-by: Mirza Krak Signed-off-by: Sandy Huang Link: https://patchwork.freedesktop.org/patch/msgid/1510734286-37434-1-git-send-email-mirza.krak@endian.se Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c @@ -1275,8 +1275,6 @@ static int dw_mipi_dsi_bind(struct devic goto err_pllref; } - pm_runtime_enable(dev); - dsi->dsi_host.ops = &dw_mipi_dsi_host_ops; dsi->dsi_host.dev = dev; ret = mipi_dsi_host_register(&dsi->dsi_host); @@ -1291,6 +1289,7 @@ static int dw_mipi_dsi_bind(struct devic } dev_set_drvdata(dev, dsi); + pm_runtime_enable(dev); return 0; err_mipi_dsi_host: