Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1936895pxb; Thu, 16 Sep 2021 20:53:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVLvYmmzfpYch+rxRJDqd32OIBrqN27cvUYtnpYjQ7q2n4hauZgKjUPA8nrk1hKKpo6A/g X-Received: by 2002:a05:6402:31eb:: with SMTP id dy11mr10527085edb.17.1631850834643; Thu, 16 Sep 2021 20:53:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631850834; cv=none; d=google.com; s=arc-20160816; b=0XvPxzD/VEKiKKVIJMcGgla+EGQWePazybLFlsKQwHlI5HRHN732k8XnSgH1Ip60Xp zDS/BhTd/2OtsPYguGsV7nOGTI5TDxMyapfKH5bkxstHj+V87QJYsdbivfBBv0h+VptG yfz3Uuim+NN1Oow9VNcNpDRjPBOgCW1zU8DdHhLtkKxxu4zcN63m4ihwbcUvmUfP/PQv OU2nxsec3SeGDr5Hu9EreXUL0VA/KqkY2xn09LqfSohZFg9KdWQ+yAtuXJdw34gMDtGx UyAq4rTnJPqKJQZJmx5SnfZnxSHhZdCTd3dBzu2JY4StZSkGP65lxBUtfwvglXTxc95I hJGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=huePjUyn9FJCYHYpEc7S5deeOtf/l5hSHs7/tHEY28A=; b=M5e38DDdpqVs6h7vtrL/W2Vdy+cXu92ecFtG/su3CFE0CW5JovmxrHLu7epo8evJAF d2rYkyj3bkOYD14L2/1Ch9PzSJIOzOtCVZu3Kyh+KYag9D5fjR8Rl/zX5rcnvWSTR6B4 A4v+TzNtg3ckx72HETardHxKZ9Coe6Bi0gH0K8SdoEWnhH7VN2FNwfK2j/VmMGUzPDbD UcyBAld6xb2SXsayUPMrX/QJsBOfNz3wZx8qzj1KvcTA6NYUfpwnynHcxGymGHjxlfVu zESUCEK3Co/V347fyM9+TVzfVVx5aVd2EzqnYgHLa/0TcPQgdOfB5nZeQvffw6j+s4ou 0dGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ljl/OG1Q"; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s6si3138976eds.164.2021.09.16.20.53.30; Thu, 16 Sep 2021 20:53:54 -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=pass header.i=@linuxfoundation.org header.s=korg header.b="ljl/OG1Q"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352835AbhIPRdJ (ORCPT + 99 others); Thu, 16 Sep 2021 13:33:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:46950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348148AbhIPRX7 (ORCPT ); Thu, 16 Sep 2021 13:23:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9B1A261BD2; Thu, 16 Sep 2021 16:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810622; bh=xbxYGYIg0UL75d3G0fWo/RQD4FPUCgMdfo9m49n9B04=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ljl/OG1QGYG/Jv2YpdNo/YMKuOklSprV+/gl1l/Q1Q5IYIDzXaQBUFaWnwd/3QiLP jrFSYXJNqjOuNZd73uxodF57qsut6Yjx3YInkeuuCs9kbxLiOXAsUgUuCiGky5BUEV D449UQWdZghP0h2qckiq2Ob0OfUMJjDVMTXjFeBY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dinghao Liu , Andy Shevchenko , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.14 209/432] media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe Date: Thu, 16 Sep 2021 17:59:18 +0200 Message-Id: <20210916155817.917342318@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dinghao Liu [ Upstream commit 672fe1cf145ab9978c62eb827d6a16aa6b63994b ] When hmm_pool_register() fails, a pairing PM usage counter increment is needed to keep the counter balanced. It's the same for the following error paths. Link: https://lore.kernel.org/linux-media/20210408081850.24278-1-dinghao.liu@zju.edu.cn Signed-off-by: Dinghao Liu Acked-by: Andy Shevchenko Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c index 948769ca6539..af0d83eaa68c 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c @@ -1815,6 +1815,7 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i hmm_cleanup(); hmm_pool_unregister(HMM_POOL_TYPE_RESERVED); hmm_pool_fail: + pm_runtime_get_noresume(&pdev->dev); destroy_workqueue(isp->wdt_work_queue); wdt_work_queue_fail: atomisp_acc_cleanup(isp); -- 2.30.2