Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp176102pxx; Wed, 28 Oct 2020 01:40:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2sj6hq0WJKQLuvWneWmiOqaPUERyZNycGuNoD22bW/WyCmcvPITEG3NL2XynKnIE6TyxO X-Received: by 2002:aa7:d64e:: with SMTP id v14mr6838651edr.66.1603874442617; Wed, 28 Oct 2020 01:40:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603874442; cv=none; d=google.com; s=arc-20160816; b=dYhYoDiJLfLk9WrpGRrTQlgN9Yuh+a2RI5bnlBl5zkIZgVcsK3wzGtuRp5pcrQoS9T 0Rv3HSAoKHRVRNA4pg/NSugCStX2w2PN/eywzYLB76Z2b2dokPOSBxvtw+LZP3iJlvcV 7dGyrnH4g7JeLplg7FcINkBHGgrAgKduVivdcBYy11aUNabD7R0IDhnm+aqIrQaJxDvO V2338MQFtUJGSvhPnGxukZ2o4ZWKn8Wxzn0XTCQWoIwBz8Yzzm724AyIiGonOMKx9qST sfolIPMTvWshxTCjCyrpZVuGBNKxk3o7aRdaWiA7AnrD1dQA9yJ5lvOnYMRrXlcroydh vsag== 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=UKSA6lMaBF6KXcvvDSjc8isQWPvjjh8zTNkJ20h/374=; b=GPAYei50MiXig75VqdrwfRRks2nYVckyh0quzuAnwhAWvks2Jmr4vAKt8tIePJyQaM r7x4oHgkWTFW0tcL2C1y+QKJJVCm2i27c+7V6AwKY3OsIQ0UkEH8JmdiwoGOBzR2okZW t83ITPCJQCeCYQi5BS9WEE02FRcsoipEgUTpK0xXKRQtc4J8guIevxnGbPE8f0Kpw4+C TCNphNsd1JRrUDYfS6ZuA6SOEK/VtUGCAFHDEXFQIdVfrnETRa1WJKuZCGjzOKEdXgN3 qCdjIGBFU8zrOoOC+6lFinO2Tr3lgL2FW067HChVAlE/8m4O6MVqB4Zoq+KMqlFN9kJK o2Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TUs+pr+Y; 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 s16si2897729edy.300.2020.10.28.01.40.20; Wed, 28 Oct 2020 01:40:42 -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=TUs+pr+Y; 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 S1754969AbgJ0OHw (ORCPT + 99 others); Tue, 27 Oct 2020 10:07:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:56456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754899AbgJ0OHg (ORCPT ); Tue, 27 Oct 2020 10:07:36 -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 66C9E206D4; Tue, 27 Oct 2020 14:07:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807656; bh=Wxi1XBhGF/wh1370KrNDn2t5GpIdHOqlEnjSG0PyVcI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TUs+pr+Y45o4H9GRnIAROLG4Y+5cWTMoAzUkF6gtNlYx+R9gL6s/b9UIsqngSucMX oBdjn1zj9OpKaXHO1doQnE9pB9S+63A+PzVJEG5RPbiFoIH8hpFtuefXySHkqGm+Vm 0tdXCzapR9DVYlprm/i0kq8A9LTm2cQQIH2EHtCo= 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 4.9 102/139] media: platform: sti: hva: Fix runtime PM imbalance on error Date: Tue, 27 Oct 2020 14:49:56 +0100 Message-Id: <20201027134906.978146966@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134902.130312227@linuxfoundation.org> References: <20201027134902.130312227@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 cf2a8d8845367..c4d97fb80aaec 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