Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp295288pxx; Wed, 28 Oct 2020 05:15:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8M1b6n6p5D5WjZWvuddqBEXZ9E+5UC9qte5EbO+9MZ6YtFuCc2oLHRSmdt7HhF30Hav/z X-Received: by 2002:a17:906:1e04:: with SMTP id g4mr7136891ejj.72.1603887309625; Wed, 28 Oct 2020 05:15:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603887309; cv=none; d=google.com; s=arc-20160816; b=GMEgBo1hk5YcGSdwCQr8LfPQGufRqL6nw6S+muOE5hrBnoFxd6OJ18vwdxQDJC41lh csERVnY8YSzTvzZgvzVCLRufIiHHUH3jj/uXznnVvlYuHmiUASXHl+0684Y/mAPM6esa znXJMpP7clro7mAk91n0+rGlxBVfN3VDgCYlF6WhebrwQZWe06NYskeG03kiwPuRGc/b nuQUrurt4dRAbJ7qVnDeHKGd/ZqHqjfOPXFARPD6x7Hixo1lpyK/9PTfJusd7i4Il8SL cIbwg7kqEGY5QrEa9cx8c+340rfJGFU1MdQWczisjgXL0hlslRTvShyQXLjdpRFKfEZu ouUg== 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=wxqgfRGrApN/GxkdN79vHi/MMD2L7soLZ7oBAPggKFYWc6FmgOOuZtXQfpDOGG/qHU iBreBipRQdMEFWmIB7XHrdlneHf+d41RAAI5fe0gvI2aZ0KgMwi2t9EIGFiIy6ID9vFP ePquP1+ujGmjC6Uxu1/WBgc1iFTHz/fZ007MWPwF9uM3ACLzyJLzcdw829t9qwQ2I+9t m/CeyAyKloWCEywmCWB7vmKNh05F6xPzImktiX0EWKWjmEYmpK36Nqx1w40bRgl9DGfE ox3LrBgEQvYuAqb3yNU2oAH7tWAZ76ice4P14YbmhqSNJl32cVthmoTAAF5LgkLfPCqU TRlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=M8CPxEjR; 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 y19si2789537ejd.730.2020.10.28.05.14.47; Wed, 28 Oct 2020 05:15:09 -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=M8CPxEjR; 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 S1796008AbgJ0PPf (ORCPT + 99 others); Tue, 27 Oct 2020 11:15:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:49662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1794675AbgJ0PNB (ORCPT ); Tue, 27 Oct 2020 11:13:01 -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 876C220657; Tue, 27 Oct 2020 15:12:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811580; bh=L2+RJXccCaMCISHwYIWzmgF0+1Wiq4nILRjct3Rac6w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M8CPxEjRf+ry85wrni3YlZ1VwYI/KNb4gHYWFvz2tG8xRzBPCZn7LUS8cX7z9BOM4 QL8xVI8G/mU84fbpFMrI/vwvCE6VdtaHqGrI5ysoljJac+e7IAukuVTJHbP1sHPMDy dgjRCRL4jrAxFTkmkNw+eRljYKtY1K4RnNhFxX0A= 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.8 542/633] media: platform: sti: hva: Fix runtime PM imbalance on error Date: Tue, 27 Oct 2020 14:54:45 +0100 Message-Id: <20201027135548.217682629@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@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