From patchwork Mon Oct 24 11:30:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9849 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp557690wru; Mon, 24 Oct 2022 10:03:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ykjEVYbkWmpV8a6mZ5PUKlyQyTcqlUJuDO1etfguk5gOmTlAgXMZ0EL7F+Julb6sb+G/6 X-Received: by 2002:a17:90b:3e8d:b0:20d:2ab9:517f with SMTP id rj13-20020a17090b3e8d00b0020d2ab9517fmr38623314pjb.88.1666631025580; Mon, 24 Oct 2022 10:03:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666631025; cv=none; d=google.com; s=arc-20160816; b=0SUrq6/LHYn3RULcs8j0jluGYZMJJ78XMeNGYR+UJCtXvy1iUhmg6aBXJvyWVwaJu7 XUwm+XYB3RVllJbWf7O3pYwMbsuM8Rghatm2v+7NgTZQYliZgGjarudvepJfOfdHU7lR pIcJCJICy26hGCxjps9asP7iULRS/dQxSoWBtwi2dbSh1fCQi1gk1bBoB+7DYUBVMy+S HT+4pRjbC3Xen98+Yj6vIHIw/An0RlHT+AbgswdefJ6OxIUsITlXzcQh5sFqwM5WLqE1 7lGC7u1WlAuoMk11mtm7KNZXc0Pyrw1qK29lhPvRyzP9EMQ3u5T7707YJ15wFNdNRHT7 kpXA== 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=cTaKOMTpgM4IMkGXR8tm7Ux2EjWsBdh6cOYuQmE+bs8=; b=nX1+onp0nF+01k/XZ8P1PN7wu39NWi8/PnXPWGN8OYrlswQyQgyfnE950Hd5pooJUW sOXzeU+8E1wngZjTTzYCP+k5aW4IsCxIZrDwEkCX77CRurEU+6bc0p5gXZhjS7WhFXnt owjhkWgX6X0JRBOMFtnZ+UMD2j+pXZt0Mxc+1Mgjk9WnoaNHuoBAe+nv4+bZeqwdtyUw r2gfX0VRv6O27O7iNTgd5Z2syBN8GecC13PWiKV8SRouu/20T9mgIfaWVTaxQoOWwLFU CZqJ0wvv2Xk5xhX3wuaZURrmSzL6PwsOcZzeA3szCpdQjkNNho+igB9yV9XaaOBrBfaC Vg5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DJfT7d8C; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f23-20020a63dc57000000b004197e33daf5si33107415pgj.863.2022.10.24.10.03.30; Mon, 24 Oct 2022 10:03:45 -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=DJfT7d8C; 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 S233326AbiJXRBa (ORCPT + 99 others); Mon, 24 Oct 2022 13:01:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235261AbiJXRAU (ORCPT ); Mon, 24 Oct 2022 13:00:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 090249C238; Mon, 24 Oct 2022 08:37:47 -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 57542B811C2; Mon, 24 Oct 2022 11:58:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1425C433C1; Mon, 24 Oct 2022 11:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612738; bh=HCgnyLFXNJ666+RLJs53imFRVFNh+zNwO7IvWGDTFNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DJfT7d8CxXjgpoNLfAt4HBata9PV9gCCMOqWYb3ex8cEm6Dkk1xHNDtuMWEg+qkzE JldkHZnfLsGffLeP8ZwwK3e1c22j4bjUKJ/6p45HRhxGPJtsXQjcGEsdABpvY4gYtq PlziHNc8nJz6B8O4ZpM5BlFxZ2VYkCSdK53T+OH0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhang Qilong , Mark Brown , Sasha Levin Subject: [PATCH 4.19 083/229] spi/omap100k:Fix PM disable depth imbalance in omap1_spi100k_probe Date: Mon, 24 Oct 2022 13:30:02 +0200 Message-Id: <20221024113001.753343782@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747589294333331373?= X-GMAIL-MSGID: =?utf-8?q?1747589294333331373?= From: Zhang Qilong [ Upstream commit 29f65f2171c85a9633daa380df14009a365f42f2 ] The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. Fixes:db91841b58f9a ("spi/omap100k: Convert to runtime PM") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20220924121310.78331-4-zhangqilong3@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-omap-100k.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c index 2eeb0fe2eed2..022f5bccef81 100644 --- a/drivers/spi/spi-omap-100k.c +++ b/drivers/spi/spi-omap-100k.c @@ -425,6 +425,7 @@ static int omap1_spi100k_probe(struct platform_device *pdev) return status; err_fck: + pm_runtime_disable(&pdev->dev); clk_disable_unprepare(spi100k->fck); err_ick: clk_disable_unprepare(spi100k->ick);