Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5756077pxb; Thu, 20 Jan 2022 04:04:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxB77QCl0qgDVnE6hDcsXUR0uEf2F1MMjoqGzOk2QfI5ug1me9g4YxojTYMyfYfXKvWi7K5 X-Received: by 2002:aa7:93ba:0:b0:4bd:bbca:1936 with SMTP id x26-20020aa793ba000000b004bdbbca1936mr35455395pff.43.1642680243588; Thu, 20 Jan 2022 04:04:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642680243; cv=none; d=google.com; s=arc-20160816; b=StlD6cJlbowOM3Eq3e2vyDphvFMooL6wDyndv4+kzH+/fhCb1G2AWTiejPjnax9n9M P4p0J9dYqcHBR7GsigM3KqJC15iGq6YubV8yHwrRoCrHJoH3YpJ783P1KjcPBZCdkAoQ /wywLwtklEO7nWAy8qNXD0rYhk1mDjTsZnvkIz2wt/kkj1fPTMMOfYHVL/7pntIyLqOP kwcykvV4N+6S+esT0cNucVVwRvHAAsaK90+xCtVbV4fEgvGbejIM07QOH0bQet/YiSP4 yeb9oPatuy8B9UZq2nzqhia9/EUa8gLhAnXu+jgzGkZvoD5dK2p9CQ0fqVxfW/zJ4D7f ADzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=biMT0EYXUf9WFzVJmu+bA6LfPMOGWnUcLJSdaWB25GU=; b=jS+BbvfUzsRBblL35EP7T1n1z3Kj7S8e9ZM8999VqaqgoUjhZu/b3IVYiwaGw1e6JM YG+L7XFQWbEZD96tseDerHOwz1qOLJs1At3TycQerVBPpvfCZXjr8utHQrUv1DHQGyee ANu6krGffJ12OfgiVhzrETcwDDczWoSd67Z8HVUuf1Q5XX+0Z2fX1sQRWXAQ1xB1Qooa TtEtU/J/vHdHZFMviWfOM/qIlR+WkNAvOy1iheAcQLgJnTqA6Ojk0wnCIW72edfyXIEv SR82syaYp9paQ7/KAGfpaHVkLCmjI69dXs9fnl87U5TS8mlQLMb+2swp4AWucnAvDjXP n0wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@pku.edu.cn header.s=dkim header.b=ki3Uutoh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pku.edu.cn Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ik28si2533072plb.65.2022.01.20.04.03.51; Thu, 20 Jan 2022 04:04:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@pku.edu.cn header.s=dkim header.b=ki3Uutoh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pku.edu.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244053AbiAROUF (ORCPT + 99 others); Tue, 18 Jan 2022 09:20:05 -0500 Received: from zg8tmja2lje4os4yms4ymjma.icoremail.net ([206.189.21.223]:47070 "HELO zg8tmja2lje4os4yms4ymjma.icoremail.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S238806AbiAROUE (ORCPT ); Tue, 18 Jan 2022 09:20:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pku.edu.cn; s=dkim; h=Received:From:To:Cc:Subject:Date: Message-Id; bh=biMT0EYXUf9WFzVJmu+bA6LfPMOGWnUcLJSdaWB25GU=; b=k i3Uutoh8V7zM5M2h2LDpPzdKjPNfHZWefUWviZQD+qpLCYPik+2ucuwBKl4yz0KW JC3uhl0ZzdwFCvY7F97xTC/B3PJmIkcnjxKbjRf7MV0AE2lxBHOrb78DMkBz4uiD OpRzJH114PXwB+0opEOhip6e431p1Hvg1XZh07JkZI= Received: from localhost (unknown [10.129.21.144]) by front02 (Coremail) with SMTP id 54FpogBHTbnBy+ZhSHR1AA--.62372S2; Tue, 18 Jan 2022 22:16:33 +0800 (CST) From: Yongzhi Liu To: l.stach@pengutronix.de, linux+etnaviv@armlinux.org.uk, christian.gmeiner@gmail.com, airlied@linux.ie, daniel@ffwll.ch, etnaviv@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Yongzhi Liu Subject: [PATCH] drm/etnaviv: Add missing pm_runtime_put Date: Tue, 18 Jan 2022 06:16:31 -0800 Message-Id: <1642515391-19329-1-git-send-email-lyz_cs@pku.edu.cn> X-Mailer: git-send-email 2.7.4 X-CM-TRANSID: 54FpogBHTbnBy+ZhSHR1AA--.62372S2 X-Coremail-Antispam: 1UD129KBjvdXoWrKrW7ZFW7WF1rGrW8GF4rKrg_yoW3uwc_Cw 1UZrn7XrsIqr1vqr17Z345ZFyIqFyrWa92qw18tas3Kry2vrn8XrykZw1DX34UXFW8WF1D Jayvqa4fAr1qgjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb4kFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AK wVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20x vE14v26w1j6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjcxK6I8E 87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c 8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_ Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwI xGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc2xSY4AK6svPMxAIw28IcxkI7VAKI48JMxAI w28IcVCjz48v1sIEY20_Kr1UJr1l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67 AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIY rxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14 v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8 JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfUoOJ5UU UUU X-CM-SenderInfo: irzqijirqukmo6sn3hxhgxhubq/1tbiAwEKBlPy7uA+KwAIs8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, thus a matching decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Yongzhi Liu --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index 242a5fd..5e81a98 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -1714,6 +1714,9 @@ static int etnaviv_gpu_bind(struct device *dev, struct device *master, return 0; out_sched: +#ifdef CONFIG_PM + pm_runtime_put_autosuspend(gpu->dev); +#endif etnaviv_sched_fini(gpu); out_workqueue: -- 2.7.4