Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2152876iof; Tue, 7 Jun 2022 21:31:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHgXXSxjVLNCLBSyqifMvL5JGQq0okY9MW1hK2Uj2MpNWXwVIyEOrUtqoaYBoRv4sInyBq X-Received: by 2002:a63:69c1:0:b0:3fa:e815:a761 with SMTP id e184-20020a6369c1000000b003fae815a761mr27940361pgc.268.1654662683266; Tue, 07 Jun 2022 21:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654662683; cv=none; d=google.com; s=arc-20160816; b=BJII7ShYRpPqsYr8iVZaDdvEkra94qTGpW4OiGSlWvgAhqP4CMoEQAagZDBisRFlhQ tB0T5cEHDV4bnfmJ+wYOlYexiqQrlqTZ/tkcrTIC8a5+l+hY3Uq4Z1SPwSo0jmcuMYt6 t55zFn1eQTpWPVCiPlYa/26bGy40DEnpfDPXRqn/uqNPKTPeh8wooenQJW1ASH3xCaWo OGTw20yROnQEMZKSH8nAazqVC0ugUq3HbyHlw37AGKuAiiGlvWvEcQ1nqlJvykLEmyfy UpoDVvQugRNCWMWKk21OIgBD++Y1qndVUZylAajkIyTEpJRFDpuMkBs8ZZNhp1XLQKu1 KcZw== 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=pFkxf3JSFcLiWsC0yGCUR3VXKYJ9TT3u70KNKFvWk4I=; b=FWwUfwBDLlEIbBIvJAPv4SYoqmUe8/SBONcQXiu3n/7XIy1nHm0hSB+TnS2ZXI/6rC j4GGepgU1FKGggek3rEj5fVoMmt/grInepxgfCiPzLDpT1zoyNXing3mJr1ekWa14wCD DW9Or1BDZXVO4spl4sJevJDg0Tb6WsM0O/WOkHotKGXMQ4mRUZc31y+IfuJ7Vl0JecDP fnRp6inux63HOYqxXnJ4FwvwwgOQCV98nHP3XCf6Jg3xSsVcwIk8mR4rtaEzU7Vf5ph4 QISyDeTlhndsKBJfkBFQCR3AJG+LLhOpuHavNvwhKcTBvG6EPLucE0s9y3/Z7UR3twhF wjTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lyNz+bNx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o8-20020a170902778800b001674d61cebcsi17928057pll.73.2022.06.07.21.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:31:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lyNz+bNx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1CF34253800; Tue, 7 Jun 2022 21:00:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386148AbiFGWsJ (ORCPT + 99 others); Tue, 7 Jun 2022 18:48:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381210AbiFGVkR (ORCPT ); Tue, 7 Jun 2022 17:40:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3E0B17CC82; Tue, 7 Jun 2022 12:05:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5A941B823AF; Tue, 7 Jun 2022 19:05:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ADF3EC385A2; Tue, 7 Jun 2022 19:05:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628753; bh=cHRlMGUzCXKk8F2ryIz/RpSKKPb+sErUHOmEBspnArs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lyNz+bNxQRkI5SxwczIPzBW8zkZvn9vqnungUvX1yKJ7Kd6D0Hi86gPtopeyIl7gM vR4u2nBkKBZ35QD/DA7LQsQvytZEfPpsccuAw2tUfgkhxbXzvCDXTsv6G35WNJLFIs bBM+NRf+wmSHYke0+vqjjOZoynCKLxah0cq/RfBU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Hugues Fruchet , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.18 442/879] media: st-delta: Fix PM disable depth imbalance in delta_probe Date: Tue, 7 Jun 2022 18:59:20 +0200 Message-Id: <20220607165015.701562010@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miaoqian Lin [ Upstream commit 94e3dba710fe0afc772172305444250023fc2d30 ] The pm_runtime_enable will decrease power disable depth. If the probe fails, we should use pm_runtime_disable() to balance pm_runtime_enable(). Fixes: f386509e4959 ("[media] st-delta: STiH4xx multi-format video decoder v4l2 driver") Signed-off-by: Miaoqian Lin Acked-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/st/sti/delta/delta-v4l2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/st/sti/delta/delta-v4l2.c b/drivers/media/platform/st/sti/delta/delta-v4l2.c index c887a31ebb54..420ad4d8df5d 100644 --- a/drivers/media/platform/st/sti/delta/delta-v4l2.c +++ b/drivers/media/platform/st/sti/delta/delta-v4l2.c @@ -1859,7 +1859,7 @@ static int delta_probe(struct platform_device *pdev) if (ret) { dev_err(delta->dev, "%s failed to initialize firmware ipc channel\n", DELTA_PREFIX); - goto err; + goto err_pm_disable; } /* register all available decoders */ @@ -1873,7 +1873,7 @@ static int delta_probe(struct platform_device *pdev) if (ret) { dev_err(delta->dev, "%s failed to register V4L2 device\n", DELTA_PREFIX); - goto err; + goto err_pm_disable; } delta->work_queue = create_workqueue(DELTA_NAME); @@ -1898,6 +1898,8 @@ static int delta_probe(struct platform_device *pdev) destroy_workqueue(delta->work_queue); err_v4l2: v4l2_device_unregister(&delta->v4l2_dev); +err_pm_disable: + pm_runtime_disable(dev); err: return ret; } -- 2.35.1