Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2133655iof; Tue, 7 Jun 2022 20:52:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2ZYYLTAXkO6l92eqoEMoW8IahoJw5JKybc+T7zvbWOw2pge9BRQwRTEwu8nqA25GVpqts X-Received: by 2002:a17:902:8648:b0:167:86f2:aec3 with SMTP id y8-20020a170902864800b0016786f2aec3mr10357432plt.172.1654660356216; Tue, 07 Jun 2022 20:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654660356; cv=none; d=google.com; s=arc-20160816; b=JeQ86rVpHJ05FDdgGYW/LLxLjOrMS/QRn4dtZv7b/WAQOTl68Q68wnH2sBq83eM9Zd B1h7ChqCGLG2RGdGhkBE2qCLElCYibj9mOeNUgkQ/frZbdrWROpiMArAwnh3HCc5fq6j b1ywHuKGjehJGpd/QHQw6E4NCf6lerIsyshWRtTpmhzULhkRsSCmrau7RapH/6D1vlvJ 5UjgonAY0Nh0La2+JQDhPXLCd7BZB2u5tqhHnRQMlehIPiv7WbHA+DUJpT/YVE8V/CP/ AwRye6ccqQ1waZwO65RT5mKNWn3Rvvl9U8DYTzvkY2t7bCofJZaoOl4zikJlhQqMEaLZ n9Xw== 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=D30D58q4vl9RK3Rwo5M13Ia7AqEId3/Urw/i+i7ArJI=; b=lFkD15StgOnNfddaGPP8/44eGJmGR4Nx9PiAEDVT30PDW1CYaI+raHlO0Vtqk4wtZB JjkE9BwnYw91XEfUAXQxSDNjPqaBw3rIMk556aDsc+7GO4BIJxGkiGmudApICW6pkui4 geilyKZ2ull/z7gZ6/1gkCncaoj62rvgpwGUrH1YYTioJz158tgHP1+HFBrWg6OSNUro Km9roVaSASeympM9PQKpJJhSv3Bh2m3SaIV2lVjGViKfEeiHANpt1Y/5uf7xjaT5Dmoc eFVggFMd/Uo+Uskzl8gTs5N3lytZS+2HVZtSR1J92QuLVdZ7zE2ylVHhxcDXTHSjJ5Zl 9VzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="sSaaq9a/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u5-20020a170902e5c500b00163a6be1210si29145348plf.228.2022.06.07.20.52.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 20:52:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="sSaaq9a/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 817B13C6D88; Tue, 7 Jun 2022 20:13:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386465AbiFGWs6 (ORCPT + 99 others); Tue, 7 Jun 2022 18:48:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381212AbiFGVkR (ORCPT ); Tue, 7 Jun 2022 17:40:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E6EF719D7; Tue, 7 Jun 2022 12:05:58 -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 0960DB822C0; Tue, 7 Jun 2022 19:05:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FA0AC385A2; Tue, 7 Jun 2022 19:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628755; bh=kTTiIZpJ2ysOrS1uGjg/TY4Npyhe4hfUh2qruWkuNL4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sSaaq9a/TvCD8t4+dO1o13PkzXgfeFqvZm0EE+MEQoI42L2RojVB5P/te/IOjheTc zKCctDMu6oUZ6hpardNP/w28H06kvxbOCFeA+gwuT6Og8u9ySjcgEkvqDaRbPbGuw9 /5sOfeViPvYfunGt1n1UNWZNSnnhnFoCZk3+w9S8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.18 443/879] media: atmel: atmel-isc: Fix PM disable depth imbalance in atmel_isc_probe Date: Tue, 7 Jun 2022 18:59:21 +0200 Message-Id: <20220607165015.730476467@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 395829c61a196a0821a703a49c4db3ac51daff73 ] 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: 0a0e265515db ("media: atmel: atmel-isc: split driver into driver base and isc") Signed-off-by: Miaoqian Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/atmel/atmel-sama5d2-isc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/atmel/atmel-sama5d2-isc.c b/drivers/media/platform/atmel/atmel-sama5d2-isc.c index c5b9563e36cb..e9415495e738 100644 --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c @@ -562,7 +562,7 @@ static int atmel_isc_probe(struct platform_device *pdev) ret = clk_prepare_enable(isc->ispck); if (ret) { dev_err(dev, "failed to enable ispck: %d\n", ret); - goto cleanup_subdev; + goto disable_pm; } /* ispck should be greater or equal to hclock */ @@ -580,6 +580,9 @@ static int atmel_isc_probe(struct platform_device *pdev) unprepare_clk: clk_disable_unprepare(isc->ispck); +disable_pm: + pm_runtime_disable(dev); + cleanup_subdev: isc_subdev_cleanup(isc); -- 2.35.1