Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9086957pxu; Mon, 28 Dec 2020 06:18:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEhq9E/JNdqed5QnbCTrdsO3nQCY5uSzbT9LiEf11j8WkDoAHHVyDMnF5oJpxgEtCYsgHT X-Received: by 2002:a05:6402:8d9:: with SMTP id d25mr42040533edz.278.1609165133915; Mon, 28 Dec 2020 06:18:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165133; cv=none; d=google.com; s=arc-20160816; b=QHuJ6u0xJGHCmy8WwKw8W/xBmopuLqaGLkmn5XKF71LRwMCLNSaI2OKSf9/Voc/glr CWyTOu9w+Q4vSaSTIndH+pYjia+/eAXzrYKxwiAtAVNWrr0nx9Bn/4uFwM88tdogsXcs pYY4+U9zaOLird/BPmCz7vez/dGIwNRnJuZRV9nYb1kiC4vebbivsSPQsWlIKWpEwexu 06Grpfdxqr8+to7HUSp8hHkLDlejXF4MjtuvBnpCekPV6s0pS6fVXU3m7iG25L5maN1D A3CX4b85GinbyBmKh7pobhvGw2PHqjaMvWm6kma5bLOmJI7amzkfhjCZ9YoYq6IKeShQ i5Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gsLF/hEQC5XXv3++rONsMXDEt5HUMDODycZ/Y3UCvi0=; b=TI/KD7P1iPSvg/G6+fZh8FqST17yLPy9RmfD4Oqg7i9zrX9dU1pqz1hkolxeiaV7FJ fj471BisD+qNLQwmcRJIsE9RJ9oPwT8S2QY9LVw4fnpb0mwhRolZ3bU7u5AVF2mMLwoK xVC05/wWnGEJSub7ZXeV3epNgN0dwA/+D3f7QIt9jiVXXY6fttntYptF9FT4P9VOvIN2 jHr4lY8sOwRldeEEOzrN0xae0bfL4Mgc3fvVQ5fCqBYH8CYi+OQ57Ig9rLc5vy/efjyQ kCv4jOo4wIC8SUU76lP/G5UhGtgFvXfnr27lxklMZTWEz3tPpqwQlZ1Kq1uPWcSEMg3c 2gBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YxGRdp58; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l13si18228899ejr.754.2020.12.28.06.18.30; Mon, 28 Dec 2020 06:18:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YxGRdp58; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440786AbgL1OQe (ORCPT + 99 others); Mon, 28 Dec 2020 09:16:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:51160 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440832AbgL1OQE (ORCPT ); Mon, 28 Dec 2020 09:16:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D8B70229C5; Mon, 28 Dec 2020 14:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164924; bh=ihsXcEa9n5M2aHrh3MXbtTM9E6I+p8DzGiQOyupVSI0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YxGRdp58GSBMbNU2w26zABmbqgjhNtRhowR6hmFfp5OOfFjS9HduVZNflzDRLW+VD o34M2QXkSSMlz0sqI3wwWy2QpvhL6OJb9/8ldnJ3xsYpAmmhUC5K909CGA5uPhtYiA 8KCplnpEkgr7fdPyYSX8s+sKfoxsXehHpbm1/qQA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wang Li , Vinod Koul , Sasha Levin Subject: [PATCH 5.10 316/717] phy: renesas: rcar-gen3-usb2: disable runtime pm in case of failure Date: Mon, 28 Dec 2020 13:45:14 +0100 Message-Id: <20201228125036.172285784@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wang Li [ Upstream commit 51e339deab1e51443f6ac3b1bd5cd6cc8e8fe1d9 ] pm_runtime_enable() will decrease power disable depth. Thus a pairing increment is needed on the error handling path to keep it balanced. Fixes: 5d8042e95fd4 ("phy: rcar-gen3-usb2: Add support for r8a77470") Reported-by: Hulk Robot Signed-off-by: Wang Li Link: https://lore.kernel.org/r/20201126024412.4046845-1-wangli74@huawei.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index e34e4475027ca..2cb949f931b69 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -656,8 +656,10 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) */ pm_runtime_enable(dev); phy_usb2_ops = of_device_get_match_data(dev); - if (!phy_usb2_ops) - return -EINVAL; + if (!phy_usb2_ops) { + ret = -EINVAL; + goto error; + } mutex_init(&channel->lock); for (i = 0; i < NUM_OF_PHYS; i++) { -- 2.27.0