Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1701895pxb; Thu, 16 Sep 2021 13:23:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4H2HtO9SGFDqObGJcsc+tKAuD3dPuI1J3Yaa9HcVSI2aXYU31fBlHREkU9pfPi2HiWfxn X-Received: by 2002:a17:906:b886:: with SMTP id hb6mr8331385ejb.193.1631823781387; Thu, 16 Sep 2021 13:23:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631823781; cv=none; d=google.com; s=arc-20160816; b=mFhkF1AEBcnBaVbjwDCXaeByDpP1hwldS0ZQcyvn1HYa9lDPZq4AnjpwlTf2SSO0bf nCwyfFHGSfVyIV50JkoOlstwVWJnM98Bl2e70B0P7tdfkxRIsEr+BCJNmw5UE1Xthawd 3MhfIXtpZpFGI9pdTPacjStESSmMQVt2wzu3i3muEbpx8ilkfJ9opcDnZF+bjcaAKK0i yOh/MW7k4Ij4abXplFzel/cG7VaSngmueoTrD6Ncht7fpLuprck4A5+jtCrBliJYcgqE LvdZ9ddy4x8+v+NlD8lBqIrlk6KFIJhh9sc/TATDNW56rNme/hlyJDm/01F11eRhr7+C DO4w== 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=WZYpCWR26kpci6PCWjjdwImE7ZSuaRhl/cb2Lbo/Bb4=; b=UhOu+X5IGuvC/FPzDbpdspb9AgvgvIQwjhDtlKBRBkl8/xPWgLBSPKWWHsfJ0gjQZc Cm3hsSfAuS9yKLatA9razri2B8wii/H57ouOC2jaBwU5/O0RR8bJ9LQpJ5HORAqdT7ni RQ2GrlEKjVENKkIAZ+KoiEZ40Lmye0ricX58b9Jm2VUYolkb+mDzdKYQA5USJ7JhJ2M4 JEogH5o+mu5rwAPnFWUGTDvTivM0gB3OcFtsUf8rvFUpzixDoz0xSTW9z14PHprlvNEp hUTlUXkdBbl3iPKFh9dmwGgAQnoNpd1+Dpsu9GqexA4kZLuyR1El4h59CZ17/50YwnAh ee8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="O0zHzK2/"; 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 p62si4708009edb.327.2021.09.16.13.22.36; Thu, 16 Sep 2021 13:23:01 -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="O0zHzK2/"; 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 S240605AbhIPQYu (ORCPT + 99 others); Thu, 16 Sep 2021 12:24:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:54616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241098AbhIPQPL (ORCPT ); Thu, 16 Sep 2021 12:15:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D9B94613E6; Thu, 16 Sep 2021 16:11:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808664; bh=r/XfC9YknuEJTwDT2ObfBukG4ljdVEksqJ+CNLioO00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O0zHzK2/CGQE9qoCxqjsz1nCPBCedTOnrnreKIBH15auKquesefSiX1UKe8TxDy/E 6Y63yeqfi08eE92viZdQ/Nezzdi8ph6nE0fHTRvfN1mHHIDvEX1wk2jxNm0hXaM9KA hxyc6aQRicEXUOsg1l4UnCo9JWLpFC5HlGfLRV9E= 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.10 144/306] media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe Date: Thu, 16 Sep 2021 17:58:09 +0200 Message-Id: <20210916155758.958206944@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@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 0295e2e32d79..02f774ed80c8 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