Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1122008pxx; Tue, 27 Oct 2020 08:45:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiLKUELb3LIOUh/Xzjp2FyowTllR4QTF5aIejwKEvyukN8aCOf8yoZLRRnm17XL+Uswnnn X-Received: by 2002:a17:906:81c5:: with SMTP id e5mr2945806ejx.10.1603813513078; Tue, 27 Oct 2020 08:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603813513; cv=none; d=google.com; s=arc-20160816; b=TdLjX9S4UxovczReuZap+nEV6ww/UbHlLWsw+zOfyVZtxWwtxkUOuPj6zJVtGAzIaz PiJAES/cGWjgMeH0DkSLjWFGI56aSvSCBo6dBJC6Yjs+l/mrJMe7aJe8NxQS38zpq25J PgLcn8iOhxSGyYQNqMYQ2L+iTpzdqMNMQ3YGFl8pNVHIYypnQ8GXzWlG6nWYNRl1ofiA 56qjNovYoL6gWzMO4sFUCoVW1ooq2HNh2pQNkOWCG8efFzm/O5F6DVHkH4Fl7TUjd7pL 3037K6y3uYRj+2XjYxObG6EPitDROEHd5zchoIGLgT6Rk36fJ4cZVizoIAyruK0/RtsF BKKw== 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=P2ZBQHOwyPkDCyl2FCvlVYM7QR897TFXZiJZ0QrF7KY=; b=0FDTDjnU9xILrMftLyRY51x/kdAHY66UiO9CP7nZTq1Xh8u8LD1iOcqKasFPyY06Ks ewbfb5M8TBrNj77xSKf1CCXbVBNyBeemMIGrsokw7JAgDKXFZlz0MJYcL5O1U6gwA5Yp aJY6yH9vtwU7jsqTji6C3wdg1dsdzcVc5A8U2dQYXaFgnJvdskEmJ1Jsj3eDpVSrU2Z3 ksWRrv+kDD9njPScBY/ZH0/+vzafcqz+avcZCOnnduISkHA7tklA3bI4h2puwMRYMb6g Q/g8GWfjFYCpnNsqYcuoqu60q0acP2jmJcK3vZ8R58fr81IiSG26zKk0hUSqenikqHh6 otIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1nj+DOhX; 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=fail (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 dm9si1168086edb.76.2020.10.27.08.44.49; Tue, 27 Oct 2020 08:45:13 -0700 (PDT) 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=@kernel.org header.s=default header.b=1nj+DOhX; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763726AbgJ0Oos (ORCPT + 99 others); Tue, 27 Oct 2020 10:44:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:43892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762686AbgJ0OoC (ORCPT ); Tue, 27 Oct 2020 10:44:02 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 42223206E5; Tue, 27 Oct 2020 14:44:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809841; bh=L2+RJXccCaMCISHwYIWzmgF0+1Wiq4nILRjct3Rac6w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1nj+DOhXSMwiKt6sFoERo3l8F4MaOlfvjzHL4pwsXVpi9OUadfKuHjtjIxB10qMNP +7nGWp9jk3Vzu7X4b7kXd28u0t+9iqMg66j9TsXe7d11VEFkUJrYGuUxpgs/1lmqpO N+dPSc6RO/9CIKHTj6N3/TmCmbUtt1F+GOZPM2gA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dinghao Liu , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.4 338/408] media: platform: sti: hva: Fix runtime PM imbalance on error Date: Tue, 27 Oct 2020 14:54:36 +0100 Message-Id: <20201027135510.715547039@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@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: Dinghao Liu [ Upstream commit d912a1d9e9afe69c6066c1ceb6bfc09063074075 ] pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/sti/hva/hva-hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/sti/hva/hva-hw.c b/drivers/media/platform/sti/hva/hva-hw.c index bb13348be0832..43f279e2a6a38 100644 --- a/drivers/media/platform/sti/hva/hva-hw.c +++ b/drivers/media/platform/sti/hva/hva-hw.c @@ -389,7 +389,7 @@ int hva_hw_probe(struct platform_device *pdev, struct hva_dev *hva) ret = pm_runtime_get_sync(dev); if (ret < 0) { dev_err(dev, "%s failed to set PM\n", HVA_PREFIX); - goto err_clk; + goto err_pm; } /* check IP hardware version */ -- 2.25.1