Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp191700pxx; Wed, 28 Oct 2020 02:15:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyegcNvsQ+hR3dy92eZqEf09eNYDfu+PN5QoWkLzG4LuO5TZe3/LjDDvXRL6P0mV+aUChF7 X-Received: by 2002:aa7:da4d:: with SMTP id w13mr6489655eds.266.1603876547028; Wed, 28 Oct 2020 02:15:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603876547; cv=none; d=google.com; s=arc-20160816; b=JGujDgiCyVdyxio1kb7IymCE+UPGE88oNWhZUn2mwnyefgpb5SY82PVhDbEwtJg2bh nPu0raV8F7Z6h1qInwL22d/xWDpjJiCO0O9yf+evVw/o4qP8xRJh/jXlFR8mFhCRZZZC lc9VMYNlel9m67Tz7cqQHXpGjBgwHttyi6b6to+igEuX7uO4n9fPhj8sc6iPXT7REsb9 nxylHPFkndpgVPWY+tMIyxP0vb/CE7u3HQ8R2RjqGzhlo0eN9oB3sVc7SX7I3hFmfApL 4BIvMikN8j7CFMQWYFhn3kc9uTKR0hf5TvTkrvxf1pj8OwFT6SdcVhF2/5z44Kexk9R7 dTrA== 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=VbDrlnU6vU00gDS4tasUzfIMXjMoYd16SzcOtf2/SJ4=; b=cumZ6b7PZj3fec65giSt4+cIrxtPYygUQm1B1PihgqMVuIQvRQulxH3eWUH/KyBw7c YZQHhl59SOUADLm50NDdWrFvmvHxhygLIcCE3xXaYj6Wcamn2e4h1NdnjFWOWgE5uigG Y5OGb/ulZIm4JFPO5uKuq6fv02cW49PKk3bc6tQXv8qr/oqIiF5GAgvN5NN/8NgfK4fS HXhElBQ0WcMXjp2HF9OrVAokhUohxUtW3sAPNTHkQczZKJukVA9ujIqsmJ5EsMd3nn9V ku2AaCLRDqxsAA+k02cRA8XqetGceoXwTJAtw5iRHGHzCTdIenZwDr/0TfXCERKhHwj7 YUyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TxujCxk6; 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 d2si2953320edn.245.2020.10.28.02.15.24; Wed, 28 Oct 2020 02:15:47 -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=TxujCxk6; 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 S2901004AbgJ0OSD (ORCPT + 99 others); Tue, 27 Oct 2020 10:18:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:36090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2508012AbgJ0OOa (ORCPT ); Tue, 27 Oct 2020 10:14:30 -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 E6D34206F7; Tue, 27 Oct 2020 14:14:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603808070; bh=SSRlL4f84kMrgd9oCMsZLq8cF/Dwc/cJu7lwmU1Wjew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TxujCxk6srnMq57ULEcEUKi+KMik6vydLT4a9MEd5dFTOheagqO5SnRVpt77PEITq V3vzZsjp8GifxePS/QbZoD64vf5w7rq6FKBC/Vyt+0NmoFbSCjsmsaQ10IsAN8/LXh l2nrG35NIYWQE653QuSpvM3GpNR9iI9oPkQauExE= 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.14 146/191] media: platform: sti: hva: Fix runtime PM imbalance on error Date: Tue, 27 Oct 2020 14:50:01 +0100 Message-Id: <20201027134916.730436007@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134909.701581493@linuxfoundation.org> References: <20201027134909.701581493@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 8dce2ccc551cb..1185f6b6721e9 100644 --- a/drivers/media/platform/sti/hva/hva-hw.c +++ b/drivers/media/platform/sti/hva/hva-hw.c @@ -393,7 +393,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