Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp445817pxb; Thu, 9 Sep 2021 04:46:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKVqWzZMLOJn4agUgKTT1y7J9aTE5UcyaMWXSoimZuTbBrl2vvSpRtVcHkWKbvrpXbOrAj X-Received: by 2002:a5d:9c53:: with SMTP id 19mr2187395iof.192.1631188016739; Thu, 09 Sep 2021 04:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631188016; cv=none; d=google.com; s=arc-20160816; b=FBtr1nf3+4MqSDTZwew0pKYGlvuoVxAKcBAktcWNUNvzkU4FDJ9D8jMUTsWXPExIFZ Ge2sUXZ0T9SlGYulm0LgclBiBh8B68EPVizQrRc/V+Jxj4lSRFpJ2AWUEcYGjTKaxkDy LmMvtlSFfa5rcw2YKmvEI0JENhH4TcDoT0vNG9XR7OsUl3t9ki44vExoMQ0Aj/Ul9ZRt JXJF3rSJ/ttkyFCBjzYPXD7i7qBkyAO7TpU66B1RLkn3Q7Dn0n4vyV2cOk1n2twrxtA/ zh2TvYDYU6Wh5WBxqbUGlVTxwLJYx24Vu2XnQuDQwbvzUS37RylJJ65btPrDWNNo8gVQ YN0A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=huePjUyn9FJCYHYpEc7S5deeOtf/l5hSHs7/tHEY28A=; b=Y6w/ybeRCllg2zS0t6bHvkHZuC6BIjkz1GqhKPC/0S2w2rMp7Ku6h/OZF3psvC+o8l nNeB2H1PHs7Kycboczt+GhwvUEas2XuMAKdUH/xbgiarrxpEmeyEuJ6nNsxJPqc3VTNG /XJcYzOdmZiHxb0z+1X+IFsQEvPyzqvsHbBYjRzr5Eax4tXpbAeT8Nzmc4gOwMwrUCPE 0eNZsJBElyveTA9bccqjQmAz5DzRpM2vTkcuMlBDn/1+GbS9x69/NsNRs9J7U9wsxkP/ Pefan+sPUMzIeOWZUhYqDq/eRa21Qa+BPf8tDNaFaCQForFwqAP9vhPDSaXNpKpipaUN KynA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kjwyaAlZ; 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 i12si1674442ilu.99.2021.09.09.04.46.44; Thu, 09 Sep 2021 04:46:56 -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=@kernel.org header.s=k20201202 header.b=kjwyaAlZ; 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 S237594AbhIILp7 (ORCPT + 99 others); Thu, 9 Sep 2021 07:45:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:46202 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238930AbhIILnv (ORCPT ); Thu, 9 Sep 2021 07:43:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 26AB56121E; Thu, 9 Sep 2021 11:42:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187737; bh=xbxYGYIg0UL75d3G0fWo/RQD4FPUCgMdfo9m49n9B04=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kjwyaAlZqMeFves7jb9Ccc0UyabePY6y+P/Xxr0YIaTJchLVfvMUyzh2btB5VOTGB ftsMVcjd98683lrVY6siqyhl7bYeBKMAZZkR2dWpyEeNIXY65zeNSsXQVCQ6IDlYBb 4bqG3Pre4maXpa2UtwEqvK3lJtve3AYraFYYBfeAzxQJ8JiejX8l47FiuiRl0OeIcU VQI2g0/rFCNQYVwIGliAxpzsWUHJUTm8lUuVFardTFLvLGIrn7U4ZtwBXKaREpQn5O Izlclb9pH/7mpPjRrln6XwQKzy8by/JsiQhS0QM0e4XokKgT3QTl8lh1RlxZzOYMFc vmXtpABukevHg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dinghao Liu , Andy Shevchenko , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH AUTOSEL 5.14 055/252] media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe Date: Thu, 9 Sep 2021 07:37:49 -0400 Message-Id: <20210909114106.141462-55-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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