linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Dinghao Liu <dinghao.liu@zju.edu.cn>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Sasha Levin <sashal@kernel.org>,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev
Subject: [PATCH AUTOSEL 5.13 047/219] media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe
Date: Thu,  9 Sep 2021 07:43:43 -0400	[thread overview]
Message-ID: <20210909114635.143983-47-sashal@kernel.org> (raw)
In-Reply-To: <20210909114635.143983-1-sashal@kernel.org>

From: Dinghao Liu <dinghao.liu@zju.edu.cn>

[ 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 <dinghao.liu@zju.edu.cn>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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


  parent reply	other threads:[~2021-09-09 12:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210909114635.143983-1-sashal@kernel.org>
2021-09-09 11:43 ` [PATCH AUTOSEL 5.13 008/219] media: dib8000: rewrite the init prbs logic Sasha Levin
2021-09-09 11:43 ` [PATCH AUTOSEL 5.13 009/219] media: ti-vpe: cal: fix error handling in cal_camerarx_create Sasha Levin
2021-09-09 11:43 ` [PATCH AUTOSEL 5.13 010/219] media: ti-vpe: cal: fix queuing of the initial buffer Sasha Levin
2021-09-09 11:43 ` [PATCH AUTOSEL 5.13 045/219] media: hantro: vp8: Move noisy WARN_ON to vpu_debug Sasha Levin
2021-09-09 11:43 ` [PATCH AUTOSEL 5.13 046/219] media: platform: stm32: unprepare clocks at handling errors in probe Sasha Levin
2021-09-09 11:43 ` Sasha Levin [this message]
2021-09-09 11:43 ` [PATCH AUTOSEL 5.13 048/219] media: atomisp: pci: fix error return code in atomisp_pci_probe() Sasha Levin
2021-09-09 11:44 ` [PATCH AUTOSEL 5.13 091/219] media: imx258: Rectify mismatch of VTS value Sasha Levin
2021-09-09 11:44 ` [PATCH AUTOSEL 5.13 092/219] media: imx258: Limit the max analogue gain to 480 Sasha Levin
2021-09-09 11:44 ` [PATCH AUTOSEL 5.13 093/219] media: imx: imx7-media-csi: Fix buffer return upon stream start failure Sasha Levin
2021-09-09 11:44 ` [PATCH AUTOSEL 5.13 094/219] media: v4l2-dv-timings.c: fix wrong condition in two for-loops Sasha Levin
2021-09-09 11:44 ` [PATCH AUTOSEL 5.13 095/219] media: TDA1997x: fix tda1997x_query_dv_timings() return value Sasha Levin
2021-09-09 11:44 ` [PATCH AUTOSEL 5.13 096/219] media: tegra-cec: Handle errors of clk_prepare_enable() Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210909114635.143983-47-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=dinghao.liu@zju.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab+huawei@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).