Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1945499pxy; Fri, 23 Apr 2021 23:56:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfegekxwzTZPW0rB7bhUyTTg+Yc5jwWhxj8cEhTLJLlig0cHv9HAoacL8HLmqz4Lc7xkKN X-Received: by 2002:a17:90a:4290:: with SMTP id p16mr10012401pjg.120.1619247371089; Fri, 23 Apr 2021 23:56:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619247371; cv=none; d=google.com; s=arc-20160816; b=NHVO3d/zk2BMzP5i0UqnqNnCU9nmHjDKGmfbTgmO5mj0PRdSt0KIiaH74jxP43xFG1 s0eTvcOn65BFQqmycNiP3PXAsKzhsoAOqXC9wvowYQcAkFxV6po8e8zgeeUDVyfCJPCc vLldE+g7ueSRwv458mi5zT5Y3OOz7g56Bf7FBO1O9VwzxKQYMCT9LJASMjt4/RUpUN5P 99zLwH9sqT4o0r1NZWrNWNaYJoy0936Dgrpl3hsm0cZAya6a0nsUEeY3sXgjJR3JZ20R DZFH0CQJoopuOVgT3D6IbMQZAQomelQBy5vOdSY9BxEDR/fMxBCO8N6qFiuRsQuUWrjP hu4A== 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=yiEtZ9AcmIFHMSqSXAh+mktXlCJrk2/tGS8Xq+uJxKo=; b=Ixol1cKWOcvtlub6sCotRceby9iZSiDMhneQ6lILMaHAXtF7KSo83ne535NSGjtZAk yn7fg+lNsfApmdBy6JYS80j1RN/YRtKl4OtsKC5P/kN8zCU4vh1x90MdWZzSo6ysxrXr qEgNsapJ9B3p1/kZFwD+cBGrUIYe0e1Huv416BklWz/Y9NJwTFqvfEJ5FZfhVF8CCFcN vhXNKt/nwZ5WxVN8rCoAjDiWs5q8HpjGiLgMonVfgDClslTkT7kp/RWf6DVrdWpOpy4U o4Zb4o7/0s597W6EPBySJ9TDBcv3+g7nj1Z9yxb1YtlW3EputLH1ZcazXxCVg971KQy6 GCJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=Y22p7EEh; 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 h6si12792002pjq.104.2021.04.23.23.55.58; Fri, 23 Apr 2021 23:56:11 -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=Y22p7EEh; 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 S244845AbhDXGzA (ORCPT + 99 others); Sat, 24 Apr 2021 02:55:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:35724 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237227AbhDXGqm (ORCPT ); Sat, 24 Apr 2021 02:46:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EFF5E61959; 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=CBbCf8lLczURo0R8ANC6iiJbxWCN1ESFz/X/hIdzJFg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y22p7EEht89HqGCobieU0gYu8QJWechaRxocbE5Ovi/ewgoX/XGnd+ZJ+8CE4H8ES YYvfobCK80m2jgSB8ekwJ5H6jRO7l0+RbuqOJV+K3d/UAv9R8kkma0Ijp9NFRh1CAw Tx2Yv4XjEefQ4/TZ0yiwB1oG+kdisZu/llPL83OffHrV3+ECbNXr8yKTtjbe2zj2UV mC6v29p6F5rgXYvJ3qQgadSPH5px9q45cNcXh760oEVW7SH909WE15/n50ERnWpEzA po8TKK5ICwaN4BBkjcYGLKgUg71UM4bCiB6wnlugHGeEX+bNewM/DsJ1k1IqxHlxfM TjKFO3D9IA0mg== Received: by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1laC2m-004JgE-Ch; Sat, 24 Apr 2021 08:45:32 +0200 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Bingbu Cao , Mauro Carvalho Chehab , Tianshu Qiu , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 52/78] media: i2c: ov9734: use pm_runtime_resume_and_get() Date: Sat, 24 Apr 2021 08:45:02 +0200 Message-Id: <0bfb7b72201ccfe443d90e4301ce2c24428610ca.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/i2c/ov9734.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov9734.c b/drivers/media/i2c/ov9734.c index b7309a551cae..ba156683c533 100644 --- a/drivers/media/i2c/ov9734.c +++ b/drivers/media/i2c/ov9734.c @@ -644,9 +644,8 @@ static int ov9734_set_stream(struct v4l2_subdev *sd, int enable) } if (enable) { - ret = pm_runtime_get_sync(&client->dev); + ret = pm_runtime_resume_and_get(&client->dev); if (ret < 0) { - pm_runtime_put_noidle(&client->dev); mutex_unlock(&ov9734->mutex); return ret; } -- 2.30.2