Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1946183pxy; Fri, 23 Apr 2021 23:57:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCIOxkJaRAIThxpergH9l6siPvy63idXL9JjtxnorOnTtNfp+TngXf7naemGyoR5CDIQJ1 X-Received: by 2002:a50:e702:: with SMTP id a2mr8944859edn.3.1619247470148; Fri, 23 Apr 2021 23:57:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619247470; cv=none; d=google.com; s=arc-20160816; b=w1Cfr4lsCBYEqz2iUZT1UUrfY14WMgcBWTlE7q33xqXNAnQpYy6EV6SO+tj+ZlYohl 6SRRgGAj7bunFGaSwT9vGuM4jF46NYr2H5jBUloWGiOod9xeWhfI184xpUm1qCkecbN9 gXs4Mbiw0YC8n/FzfFJ44pD27JKf1TUoc3v9baPVh5WQDLkSDjBcZTVB56Hiz24IfgZ4 Dhw5qF/n4F1qRyvc5JvyTulUy6EP72awRc10/n9aLUJ+Tt+4fKWUynrrRqELIu49Gc3t kZTdkeK7jNvfi9v3smFrw3dVNdg29y01lUFqgplJz/clXlb5r6fuF0bE8DYbTC92p75z NDdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=31lQ9Q0q3z8nrhZvnV4h0miuLmDMFUTT13BiN8z3rQ4=; b=y7RSFPLTc2TdOVQuVjGep0lkRaFY9VM912na9v7agA/ytGkYMMoWa/zfsoRSlIjtHv /5CvVak3QwdMY5792oJS6AT4nQ3SNw1rQuk8dq9wcYgLcD1QDXq9MZoCkIY2ko0JhKau IbvtN1ewJZFWD7Aat85uH/8eFbZN/cynvTA2XonxDz5Bj7DxDmUI2NjWGqt/rBQJwEOT CrWcvwoYqRaUzUwKUyjAbq2mroda8o9eK1THwPSqv/c1Yd32yYZq48UnU+27CjoV0OUu 0UlYSiXdKM4AWKyF4aZ7bEWkFPGJ4lneb+kesCcTufqXhMw+If1mu7rVQ/tA98xfKA91 bsqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b="JJ/17EXd"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j16si8987159edj.357.2021.04.23.23.57.26; Fri, 23 Apr 2021 23:57:50 -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=fail header.i=@kernel.org header.s=k20201202 header.b="JJ/17EXd"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244812AbhDXGyz (ORCPT + 99 others); Sat, 24 Apr 2021 02:54:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:36128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229704AbhDXGql (ORCPT ); Sat, 24 Apr 2021 02:46:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DAA3661947; Sat, 24 Apr 2021 06:45:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619246734; bh=Luw8i8Wcr7RDhUVQIyKtJIy/TBYgdc1v0nBhRGIz5pw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JJ/17EXdIaQo4vBdqcn8JHsGJHsoMw5jkwHxTd8RLhlkeCZAVlDKL4jNlzaLs6zMk cj0bG8LnkmhW8S5GC1ZZuqLIUmdSxJX9He/1gjHyQRPUVhn+Kra6G0EBaKWOhGhzle Yt+PQvyv8jUgLE+29ufR1Oj0O1C5zJP31ty8iLLdn3Y6Og3qVG6+uusqBuZ0G71rCq qUlN1tmG/hoaAGBgaAkvRuXVEUvwk2fhX/enlHxkU/Imxl2NrlxGmrEWhx3NkiN+j+ d17kifflA8o2KmO0/Ki7VtRHwTKYRVvCc5pdLFCJ9MuB99GYHxTWWmCX+fCd8UzFVk l60IDpBEO1rEg== Received: by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1laC2m-004Jh6-U4; Sat, 24 Apr 2021 08:45:32 +0200 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Ezequiel Garcia , Heiko Stuebner , Jacob Chen , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH 70/78] media: rga-buf: use pm_runtime_resume_and_get() Date: Sat, 24 Apr 2021 08:45:20 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/rockchip/rga/rga-buf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/rockchip/rga/rga-buf.c b/drivers/media/platform/rockchip/rga/rga-buf.c index bf9a75b75083..81508ed5abf3 100644 --- a/drivers/media/platform/rockchip/rga/rga-buf.c +++ b/drivers/media/platform/rockchip/rga/rga-buf.c @@ -79,9 +79,8 @@ static int rga_buf_start_streaming(struct vb2_queue *q, unsigned int count) struct rockchip_rga *rga = ctx->rga; int ret; - ret = pm_runtime_get_sync(rga->dev); + ret = pm_runtime_resume_and_get(rga->dev); if (ret < 0) { - pm_runtime_put_noidle(rga->dev); rga_buf_return_buffers(q, VB2_BUF_STATE_QUEUED); return ret; } -- 2.30.2