Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1946123pxy; Fri, 23 Apr 2021 23:57:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGaDBFso1jKY1fTDTrMO/eT/csEoWG9mMwRsKxxLhWBiF4shJ+2B7QL55TFbkGPwm/sDqM X-Received: by 2002:a17:906:d81:: with SMTP id m1mr8106356eji.105.1619247460081; Fri, 23 Apr 2021 23:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619247460; cv=none; d=google.com; s=arc-20160816; b=BLldv0eSjqLNaOOHtV9thhALBMRFfM/xoYoKdDluAsVP5U6MdF8202/Daqu5cwN81L aLrO6co3AnXH1aJJZRzxUcecyM24ZuIoMbDMIyMcxtztza3d81dhGNo0dLvJ5TCdnJlP E4zp1mNMMLsgKx3e7wqeVtnmjeMe2rTcEqxBMg6H0S/UMAVQxlgfppF4kh4DfBWqBIiO 1gS9WtL67LRgbfCbQJlKrIaS8quV2XQwPVdz/Ymt4ljNuSDa7JS+UmpML/NpaK6/u9qj XUhe5DbZ6+8QMWS1/GOqdCoWBp7t55o9e3uBsOc3cToOz5emeZcnoBd3D5wZQq/CTN7Y pffA== 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=wNlWAJheWo8r305lpFRr+Xmq5CAdeEepltQZlmQJw8g=; b=ivJxluL8JdYq4c1FJno09vHgdVIIGJmBbsnEUHWDJWQ7k/zrrsJSq9SavWKmZ8pyep Ee/ko8E0BIdOAX1nKWkPK2ksdA1eK1LkixG7fxemvZ1wP/hgB8s8lcAajp4SW/M/vI9n TLeb0Q3TvNgDBHHAEUIyFf671fGd3mhQfc3op2i6vUlk7tiYxSthfPK/FR8XuQNTXJPk XSErsu/dzC6ECkpQZEIOSysZBapo8JNM9FSR69Hpviltk5hqjKAepQ7ULbVRQ/vk4h9V 9agXoQYrJSZNNUqMfxxn9+nNHrcwqN37KFan4xuINeTzUtlKQlA4demuKai/CAfSYfHr j13w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=PYfBpCc0; 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 jz11si7073804ejc.257.2021.04.23.23.57.16; Fri, 23 Apr 2021 23:57:40 -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=PYfBpCc0; 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 S244233AbhDXGxj (ORCPT + 99 others); Sat, 24 Apr 2021 02:53:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:35772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236981AbhDXGqf (ORCPT ); Sat, 24 Apr 2021 02:46:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D21C561940; 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=rChg/pXG2Qjbehywcb/+z5hE6+LFH66GvNnoCtLFEBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PYfBpCc0b7yu+PCNCaJYwzPgNpbFVSNy8eLEqsU/6U4xeQGj/iXnAMxEllUBEx/uN QRTXIpDwnwhOAPo0qTpRtaBJiNocQiF+AOLWYkm/3X4SYG0+5GN7VTt8ZnsRLp+JXL uYcpJEoH6bjiWN32auW9bGEup7RtOGFCU4LuIeMgz4NClFaWsy4nVOhi2kJT6ZcgfR FxPb9QJPe2qg6loO9J8bpK+zhjYABQ6chMCKkN3uYNsjrHnq4YSMRaaehTPsXasWvG igmEm3edSnpkHHt4mQ45U+PS1cy8frNQ2vGTRkuW76pxe2icUGVgZsGIJoX7F4tE2Y nog9MF1ncFQJg== Received: by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1laC2m-004Jh9-WB; Sat, 24 Apr 2021 08:45:33 +0200 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Dafna Hirschfeld , Heiko Stuebner , Helen Koike , 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 71/78] media: rkisp1-capture: use pm_runtime_resume_and_get() Date: Sat, 24 Apr 2021 08:45:21 +0200 Message-Id: <563a000045b459596c013269311a738d2dddaa37.1619191723.git.mchehab+huawei@kernel.org> 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/rkisp1/rkisp1-capture.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c index 5f6c9d1623e4..3730376897d9 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c @@ -1003,9 +1003,8 @@ rkisp1_vb2_start_streaming(struct vb2_queue *queue, unsigned int count) if (ret) goto err_pipeline_stop; - ret = pm_runtime_get_sync(cap->rkisp1->dev); + ret = pm_runtime_resume_and_get(cap->rkisp1->dev); if (ret < 0) { - pm_runtime_put_noidle(cap->rkisp1->dev); dev_err(cap->rkisp1->dev, "power up failed %d\n", ret); goto err_destroy_dummy; } -- 2.30.2