From patchwork Tue Dec 13 12:33:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 634228 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB4EDC4167B for ; Tue, 13 Dec 2022 12:34:21 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0E3E318B3; Tue, 13 Dec 2022 13:33:30 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0E3E318B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1670934860; bh=EyfhgTFopWLDFA77W4AV5TOe7xbplwIB2XVGDrhTJo0=; h=From:To:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=HtsSjM0sQhMT3hnw6zQWoeyYDgDIKwBS+8zkaH1/OD5s5nor3ILwE1i1VXc5hn4GE ehMfSGLNKb2Hg+AVMW9/DvLIwtP5QiRDHdz7RBzZQJhMtwLEOiKMLCKkY8s8goGNPE FqLA9BbJjrlHtXy5rsv/oS3KlIIY4EB6uGxvmRj4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B3494F804FC; Tue, 13 Dec 2022 13:33:29 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 59FE5F804FD; Tue, 13 Dec 2022 13:33:28 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 73C4DF8047D for ; Tue, 13 Dec 2022 13:33:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 73C4DF8047D Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Id6g0Z7R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670934804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xg8WfX4IRNBY4QR4PHkuEHRYNMq4+odOw0Nfr2y4XCg=; b=Id6g0Z7Rf701H+ABFXVPL4+mGkWr5rj8Otv0EIyquyQ0lJpc02lbxUNm2ZICjhWnQMieLT InzFynRrlZU8Xp8e8ZKJXNECGsXAglSkZoOAADzh/tNVVA0bJk5BtCFcEa0mEaMZlYlj83 SKBWWkIX69LUbMLUqRL42/t1FbsR3Iw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-639-89Zc_EpRPSuv2HcyHst3eQ-1; Tue, 13 Dec 2022 07:33:22 -0500 X-MC-Unique: 89Zc_EpRPSuv2HcyHst3eQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 310213C0F425; Tue, 13 Dec 2022 12:33:22 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.194.225]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2226E53A3; Tue, 13 Dec 2022 12:33:21 +0000 (UTC) From: Hans de Goede To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Mark Brown Subject: [PATCH] ASoC: rt5670: Remove unbalanced pm_runtime_put() Date: Tue, 13 Dec 2022 13:33:19 +0100 Message-Id: <20221213123319.11285-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , alsa-devel@alsa-project.org, Bard Liao Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" For some reason rt5670_i2c_probe() does a pm_runtime_put() at the end of a successful probe. But it has never done a pm_runtime_get() leading to the following error being logged into dmesg: rt5670 i2c-10EC5640:00: Runtime PM usage count underflow! Fix this by removing the unnecessary pm_runtime_put(). Fixes: 64e89e5f5548 ("ASoC: rt5670: Add runtime PM support") Signed-off-by: Hans de Goede --- sound/soc/codecs/rt5670.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c index ebac6caeb40a..a230f441559a 100644 --- a/sound/soc/codecs/rt5670.c +++ b/sound/soc/codecs/rt5670.c @@ -3311,8 +3311,6 @@ static int rt5670_i2c_probe(struct i2c_client *i2c) if (ret < 0) goto err; - pm_runtime_put(&i2c->dev); - return 0; err: pm_runtime_disable(&i2c->dev);