Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp438750iog; Mon, 13 Jun 2022 06:02:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQr0HbogwU6igAXQZWeWI0nuyg86DHd/XdszCEjrrGAk8DwisI9+IOOWw1Rm2NP6ik6iCS X-Received: by 2002:a05:6402:1341:b0:42a:f7cb:44dc with SMTP id y1-20020a056402134100b0042af7cb44dcmr66389650edw.165.1655125295035; Mon, 13 Jun 2022 06:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125295; cv=none; d=google.com; s=arc-20160816; b=S3W3F/QsIBNcelS5VyCkkku3V+BkdhrWCHXOuWlsg+6tzdm8M37oeog56kYmbRBDU6 ftT9PEc+dcdnZYwUEXSEF25nTNDnPvmzQaoDBewDMO7lNRjZhCUHCQvyOboXjTD/wx7i yiHofThPU0IRckTZHUrF7thNh1uDe0iqtolzV2+duuVgzsaLPY8gfUcFDuPvKxlOc8xU PnLDfrcp95VIvowAupGJiT53lsEaxH7bqzqhXa58v1nVoUzpAtsO+/vWjyQEn+ToZ9EY 6N5dgDzCgyLvenV1k7Hnj3BDxLg2LrTEi/HTUnqNaM0WLQCTgKWM7F4zl80SSRs9lA8R 6jTA== 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=PFPNJXvVxQ4gTzrkKIe1WA/RwZiWZ5tcRgHVUbSLb1w=; b=iyabMFd59wXqUq9Db2Ly9mGPReeBNO1W8FagDSmK7LQ12cx2OS1MdqMANUHYu3ZOCJ v7myXhleoju/ez5fwnBCKbQx98DI+J0cuAmFqeUoP5EDCibaWhPo/wUnp/EjUPAipoxr U5p13Ucg00KUo/87rN3fDmItseGSYrgb0ntNlGnMmYjDHPCSKnM4VYUurTsQvK+TaduI wDIc9O5jQJX5xPyLJWkWObH1ZFHNCSKRevazHH3RSlNdyX3DjLJyVi0Se9croc++8pLW TYBT10Y8m/74qrm0dbNJVrXeuinX6GdTZfntSTpxynOFMERG4u/+Dw48sIKK653xToAd S1Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yrJxKP2y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g15-20020a056402424f00b0042b42c7f655si8825196edb.33.2022.06.13.06.01.07; Mon, 13 Jun 2022 06:01:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yrJxKP2y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1352759AbiFMLVB (ORCPT + 99 others); Mon, 13 Jun 2022 07:21:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353045AbiFMLO7 (ORCPT ); Mon, 13 Jun 2022 07:14:59 -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 0CEA513D2C; Mon, 13 Jun 2022 03:37:35 -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 3D839B80EAB; Mon, 13 Jun 2022 10:37:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91CD6C34114; Mon, 13 Jun 2022 10:37:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655116651; bh=fa8RtONEmWQpmckanaaiMY87jXS4IG0Lfh1Ci1pthzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yrJxKP2ycI83SFJygM+kHfRDaUnk6GbU6eE0me9stqZaxz4ckHlSCEsRzcoa7PJSL yoJexcyb+PXorNHJsYBu5azt4k6dVzpdBl+gk5x5hhWT1CNz15HJLHDvkEiYMXnA+v jsZIMMLB8Kl7xH/eXN2uta0QthZRgabSA6aLzPqM= 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.4 136/411] media: st-delta: Fix PM disable depth imbalance in delta_probe Date: Mon, 13 Jun 2022 12:06:49 +0200 Message-Id: <20220613094932.748985448@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@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=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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/sti/delta/delta-v4l2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/sti/delta/delta-v4l2.c b/drivers/media/platform/sti/delta/delta-v4l2.c index 2791107e641b..29732b49a2cd 100644 --- a/drivers/media/platform/sti/delta/delta-v4l2.c +++ b/drivers/media/platform/sti/delta/delta-v4l2.c @@ -1862,7 +1862,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 */ @@ -1876,7 +1876,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); @@ -1901,6 +1901,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