Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2493508pxb; Sun, 16 Jan 2022 22:39:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+BbU+LzczO22yH1sSzfG7odB44jVLWVPUeZ2JJCAzb/qDaOHsFjc3GXPPcp/T0dVWg0EV X-Received: by 2002:a17:902:8695:b0:149:cb5d:ddf1 with SMTP id g21-20020a170902869500b00149cb5dddf1mr21326245plo.103.1642401599095; Sun, 16 Jan 2022 22:39:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642401599; cv=none; d=google.com; s=arc-20160816; b=fImNvhBaHxWa295nxRtgpA3pkWwzDUiW5Cifh9SVCaNk0YvdpiF8uccluHDzbVrTol 2GlOtk9Hx72k4MgC2yHcgKsEu73vTFoHtieZOqIavLV7EjaHm9g5kkbu/aqWGPAGPyPe MdM3C0wJRkDdN+P+L3ABAWx/Wc52e0+2C54aOCua+ihzwXi8ScN1vebWjBZt22B9fpT5 Dh6Bf0Qui0NehZ+bQC/k1XhLSpd8+gDZwxK/v69d0s7q9Da7zr5KazCVOJLYev9cZDya XRyaLy8x0M3Nlwm+icFQs9mmS9ukx075enD2KW8ZaSD1P/kP5MtDPy4Fp9hpBSqihPfQ LN4g== 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=4qtF5pTLgHrEtS/8byluABFgtK1z5IUdOHuMX+F5kgw=; b=Q3nDIgkUMl34Ey2LQfg51UXLIweMh8y0cbwnHu977kiPSW5OLQBqePpUFr8tDUwaJD F8y+JXnQzJFaGqxBrJl7fkEWM4ukjKKuzO48QO6U+c1kmU7NRiejqx6KEgoCkh6mrGIl oID8byb8VbgFV5Zd/n1DgRSS06C0/FB2FFcLeXE/0zsKCCAzioGgEZ4uIbH0zXbGbbwW /48vDAIz7QznYLEDJewAxbeYynz+CPwsTEHTjg5Wy8IS0+UTXXPnpzFj4un27B3VUZQR mjptgUOrAIdyZA4XqEzUi4eDrGv8U0wOlCOZm12+qhiuE2HKL55KR4dSokGgf2ST3aq5 T3Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@pku.edu.cn header.s=dkim header.b=AgpwgqDG; 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 v189si8906063pgd.36.2022.01.16.22.39.29; Sun, 16 Jan 2022 22:39:59 -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=AgpwgqDG; 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 S234934AbiAPLcw (ORCPT + 99 others); Sun, 16 Jan 2022 06:32:52 -0500 Received: from zg8tmtyylji0my4xnjeumjiw.icoremail.net ([162.243.161.220]:60041 "HELO zg8tmtyylji0my4xnjeumjiw.icoremail.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S232797AbiAPLcv (ORCPT ); Sun, 16 Jan 2022 06:32:51 -0500 X-Greylist: delayed 21321 seconds by postgrey-1.27 at vger.kernel.org; Sun, 16 Jan 2022 06:32:51 EST 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=4qtF5pTLgHrEtS/8byluABFgtK1z5IUdOHuMX+F5kgw=; b=A gpwgqDGv4gr0ssKHhJ3wqZ4uhsqWVe5I44dY0ari+e0sXuhdyWaSb++2TTeYJ6G6 5cRYWBpqAI1fOtJEijJGxMqkvxYxeCX6uLi1ASgZy71xd1mSM6ebOadb+T9NPDcA NVpS5c/R2d+GtKF6sbKa+555zST/3Y4GN1gTiJ7JZQ= Received: from localhost (unknown [10.129.21.144]) by front01 (Coremail) with SMTP id 5oFpogAXHTkgAuRh8vdaAA--.26418S2; Sun, 16 Jan 2022 19:31:44 +0800 (CST) From: Yongzhi Liu To: peter.ujfalusi@gmail.com, vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Yongzhi Liu Subject: [PATCH] dmaengine: ti: Fix runtime PM imbalance on error Date: Sun, 16 Jan 2022 03:31:42 -0800 Message-Id: <1642332702-126304-1-git-send-email-lyz_cs@pku.edu.cn> X-Mailer: git-send-email 2.7.4 X-CM-TRANSID: 5oFpogAXHTkgAuRh8vdaAA--.26418S2 X-Coremail-Antispam: 1UD129KBjvdXoWrKrW7ZFW7WF1rGrW8GF4rKrg_yoWfAFb_Cr 1rZrWxXrnxWF4Dtw17AwnxZFy0qF4UXr1DuF4Fv343trWjyrs8JrWYvFnYyws3X3yjyr1q ya1v9F17CrWDWjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb4xFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AK wVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20x vE14v26w1j6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4UJVW0owA2z4x0Y4vEx4A2 jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52 x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWU GwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI4 8JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCY02Avz4vE-syl42xK82IYc2Ij64vIr41l42xK 82IY6x8ErcxFaVAv8VWkJr1UJwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14 v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkG c2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4U MIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUdHUDUUU UU= X-CM-SenderInfo: irzqijirqukmo6sn3hxhgxhubq/1tbiAwEEBlPy7t9+qgASsW 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/dma/ti/edma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c index 08e47f4..a73f779 100644 --- a/drivers/dma/ti/edma.c +++ b/drivers/dma/ti/edma.c @@ -2398,9 +2398,9 @@ static int edma_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ecc); pm_runtime_enable(dev); - ret = pm_runtime_get_sync(dev); + ret = pm_runtime_resume_and_get(dev); if (ret < 0) { - dev_err(dev, "pm_runtime_get_sync() failed\n"); + dev_err(dev, "pm_runtime_resume_and_get() failed\n"); pm_runtime_disable(dev); return ret; } -- 2.7.4