Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1298111ybt; Thu, 18 Jun 2020 05:33:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCKLatXKxSMr0Pf3rVqIjZtUz357OvEgF+3GlkW3sPkFpgkPh0oFBa+u+UOH/ZUoeoi1WH X-Received: by 2002:a17:906:b7cc:: with SMTP id fy12mr3945864ejb.387.1592483597240; Thu, 18 Jun 2020 05:33:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592483597; cv=none; d=google.com; s=arc-20160816; b=nYH2CQQvEel8tP394buaWXT5mdeIM3QBI9lF/Orbw8h5R8ezybfnIR2WaRM+k9Wx6T ZXi9GYTDmoBhg81oGGb9OqTNzig1ednLQsl1hK2R8e8CAD3flpEfSZyH0xZGF1JZ+cEt zXbuQ+c1GIUVbd51s6PGtUiY/Rq8LuqmGMmh966eYhuWqcv7oj0SV0Zr5Av9T++9qzwP PQ7x2R/uaURD5vcwgeESrtlrhRI611LDlx3gIBZ/9egtmofnveej6VOspVQUrnSFwGJ5 nKxVVptB+xS3OjNY9aQLqrS+3en/3EJTV4EWqDss8hDpypiRNW0QcEj8pj98hA0pWn+0 4uJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Jhex78P+K+KJrMvARHBrvQ5UVYdkellCw0YR//aU/BA=; b=WEXfmrsdKSXIZBXp/vmM2njugHSMCEs4bITu5gIBgVFmG7H4+hIY6cKzf6vhBj/GG/ P5gO5JiLefO747R6iNky2igdx72+lvHVXtzrn/OFJTCXs6JzqXOuLLPREhEpZBDA0JLb qJwtQX+8cqSDohgp34i5G9C4h59VOfAC9GZ6Gj0dy38QDEzoWVQbBuQ1ldwRnvc11pBN 4lPxM5vuCx6204FwXdTuTmiNuq0K5C0zc7RNMzoSrLl2cLLXshKiumUDxzj5k7fRw6gY inC1oua2unXQQxdVTLryozqAKI+UQabRyrXFbUucEbz9NZuWRvVZ6VUhW+hodlkokViy b4Hg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d3si2019124edn.389.2020.06.18.05.32.53; Thu, 18 Jun 2020 05:33:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729352AbgFRMaR (ORCPT + 99 others); Thu, 18 Jun 2020 08:30:17 -0400 Received: from gloria.sntech.de ([185.11.138.130]:53560 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727093AbgFRMaO (ORCPT ); Thu, 18 Jun 2020 08:30:14 -0400 Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jltg5-00080e-08; Thu, 18 Jun 2020 14:29:57 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: wu000273@umn.edu Cc: kjlu@umn.edu, Jacob Chen , Ezequiel Garcia , Mauro Carvalho Chehab , Hans Verkuil , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: rockchip/rga: Fix a reference count leak. Date: Thu, 18 Jun 2020 14:29:56 +0200 Message-ID: <2014126.fRahu6ktRn@diego> In-Reply-To: <20200613231350.15504-1-wu000273@umn.edu> References: <20200613231350.15504-1-wu000273@umn.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Sonntag, 14. Juni 2020, 01:13:49 CEST schrieb wu000273@umn.edu: > From: Qiushi Wu > > pm_runtime_get_sync() increments the runtime PM usage counter even > when it returns an error code. Thus call pm_runtime_put_noidle() > if pm_runtime_get_sync() fails. > > Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support") > Signed-off-by: Qiushi Wu Reviewed-by: Heiko Stuebner > --- > drivers/media/platform/rockchip/rga/rga-buf.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/media/platform/rockchip/rga/rga-buf.c b/drivers/media/platform/rockchip/rga/rga-buf.c > index 36b821ccc1db..bf9a75b75083 100644 > --- a/drivers/media/platform/rockchip/rga/rga-buf.c > +++ b/drivers/media/platform/rockchip/rga/rga-buf.c > @@ -81,6 +81,7 @@ static int rga_buf_start_streaming(struct vb2_queue *q, unsigned int count) > > ret = pm_runtime_get_sync(rga->dev); > if (ret < 0) { > + pm_runtime_put_noidle(rga->dev); > rga_buf_return_buffers(q, VB2_BUF_STATE_QUEUED); > return ret; > } >