Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1944360pxy; Fri, 23 Apr 2021 23:53:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjDCEa4FnB86iQqG1z+FABgXZIcYUbQBvo3Wla8gWVoqJbHHRiQXMmLxaPI3Q2fv06zFDj X-Received: by 2002:a17:906:9bd3:: with SMTP id de19mr7663748ejc.329.1619247190294; Fri, 23 Apr 2021 23:53:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619247190; cv=none; d=google.com; s=arc-20160816; b=JySoqO3/jkrL+55DXnDran+ju6nKqS2zZIGcKqg7w/HpqrxH3dvD4ZoDjqPoMNVFdx a5q+X7fE/6pHAo0OGHbq+Y5X6XHIC4fJ/HSW7bS1UFvUovc5o6lxZF3ANvoVofd5nV1a CyT0NAQK0yEvaT/hhZs7sHz5oanWFI7EjVMT4MCZpqwNGPar4KeUff3Lxfm3q4ZsQn1E McgwjX0mKwkBr5v4Fl5uJQCtLICyn2LR4y/twe+5imZQlbF4VxGZSa3pZLPSeSyjDlcd NZq/g5tYpz9WWo3+KenBUYNL25uhdB70WbVUYQF/g8f1UlJQk7iq1AcvjDSGp78nCMCY atGg== 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=6tWS5AWeHgEG14BxYeaqs+XN0hv2Iox9SZeAydDvL1Y=; b=av51i8WOcO/ZNq8GWm07sPPLuhGxWZiEb2Dkv5aDX/7tYSawJE3P8AXeozGdDwFlV9 CDalvO6BmM9V9jIKQ8E/rZpoBDvQ1rZTvqJFAUv5c7Cmnh33IlA2lZKOJD7biIsbeXf1 KTTeES6br67lsmA2DPv9p9tkT/35kimVqO2N856+M8Y+1InMDTrOXOGq3iZBBxocDcZl 3QaYBpQmjxsbGsZPpXBEp6uLQ1ghcYUt9rSBALFjUPb8YZXlAi2XPalj1U4I8skubDGQ 2+XV8RGWs9pZwgsSEMIW5rcFHgFnMaQKS2g5e/6OwUeFy0SliSMID/b2q4klalkAI/HN aS3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b="K+/V7LjG"; 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 w5si7016310ejz.607.2021.04.23.23.52.46; Fri, 23 Apr 2021 23:53:10 -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="K+/V7LjG"; 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 S237583AbhDXGtp (ORCPT + 99 others); Sat, 24 Apr 2021 02:49:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:36126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233188AbhDXGqO (ORCPT ); Sat, 24 Apr 2021 02:46:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 66AF06162B; 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=1619246733; bh=tu2hhB6CHAZbCfvPd96Qq+9zsUaGe3IxV7AH+2XbuEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K+/V7LjGP5QNR/LozRTLlxP6rqFTNzKUtnPpZ5fF116wkN8e41wvxB7Hjiz1sl0ZW dfZAhn04YTu88YMwAshkldtBxB1ykXatkdrIXgvYS1fTUrvp+4jTChS5Y9mATQNCQl ENjr1t2N9jA/CNC1CkJSk/CL2JuLilyLEQyBYrQWw5uFEyqL48YmnvPjPAZnh2Nti4 3fAZy/pEZ52FteSb5/ZZvFk1BtcRyhNGFb2ZhTPeMW6XeT/uPLHmYVHkHihuo6vsBd Kxgdq0evCxU1whI5y+qBHnSyq1it1BVnD9oAxhDmTp7LY4KszmC9cMkjoP9MaRtfLj C8m6rzO6fDdmg== Received: by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1laC2m-004JgZ-Jj; Sat, 24 Apr 2021 08:45:32 +0200 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Bin Liu , Matthias Brugger , Mauro Carvalho Chehab , Rick Chang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 59/78] media: mtk-jpeg: use pm_runtime_resume_and_get() Date: Sat, 24 Apr 2021 08:45:09 +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/mtk-jpeg/mtk_jpeg_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c index 88a23bce569d..a89c7b206eef 100644 --- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c +++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c @@ -920,7 +920,7 @@ static void mtk_jpeg_enc_device_run(void *priv) src_buf = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx); dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx); - ret = pm_runtime_get_sync(jpeg->dev); + ret = pm_runtime_resume_and_get(jpeg->dev); if (ret < 0) goto enc_end; @@ -973,7 +973,7 @@ static void mtk_jpeg_dec_device_run(void *priv) return; } - ret = pm_runtime_get_sync(jpeg->dev); + ret = pm_runtime_resume_and_get(jpeg->dev); if (ret < 0) goto dec_end; -- 2.30.2