From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E18A3C4727F for ; Tue, 29 Sep 2020 11:58:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 99DA7206DB for ; Tue, 29 Sep 2020 11:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601380714; bh=fO15eBwbnxmL4fI+RPHnRPQiHTZvIx9WsiBnsp2ccqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=sxVk4lkHjMDoVQpPo4OM4w5bNYzpenHkz12G1Sv3uomf120lIBtlXlCCRDSv4JQN+ xXjjILYKWZZwxrFDG1YPvto8lUhC18bxyKfKjxAZNSbij4Ou6ZwMNDyQ1mvYZvvhG+ 1oYnaS5bDbtb+RaQrlGOtG2zRC1box0lmmlcwrg4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731086AbgI2L63 (ORCPT ); Tue, 29 Sep 2020 07:58:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:39238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730682AbgI2LmF (ORCPT ); Tue, 29 Sep 2020 07:42:05 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0EAD92065C; Tue, 29 Sep 2020 11:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601379725; bh=fO15eBwbnxmL4fI+RPHnRPQiHTZvIx9WsiBnsp2ccqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q4l3ApI4mB+bFGWvTkh7PsPfT6GuHySgbQH+Wv1r/ONtDEUeUeLtmQ1zwTroqfRwW CmADfA+C7VmKjb0HS0JAs7V5mt83pfjlWpcjpt6ZHNUv1SO4qrUqc73H8QYPxWOJg+ chqfs4cnTqr/OK8BcJDDzAhSvHyVf4qlUts8amBc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dinghao Liu , Tony Lindgren , Kalle Valo , Sasha Levin Subject: [PATCH 5.4 291/388] wlcore: fix runtime pm imbalance in wl1271_tx_work Date: Tue, 29 Sep 2020 13:00:22 +0200 Message-Id: <20200929110024.551857494@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929110010.467764689@linuxfoundation.org> References: <20200929110010.467764689@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dinghao Liu [ Upstream commit 9604617e998b49f7695fea1479ed82421ef8c9f0 ] There are two error handling paths in this functon. When wlcore_tx_work_locked() returns an error code, we should decrease the runtime PM usage counter the same way as the error handling path beginning from pm_runtime_get_sync(). Signed-off-by: Dinghao Liu Acked-by: Tony Lindgren Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200520124241.9931-1-dinghao.liu@zju.edu.cn Signed-off-by: Sasha Levin --- drivers/net/wireless/ti/wlcore/tx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index 90e56d4c3df3b..e20e18cd04aed 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c @@ -863,6 +863,7 @@ void wl1271_tx_work(struct work_struct *work) ret = wlcore_tx_work_locked(wl); if (ret < 0) { + pm_runtime_put_noidle(wl->dev); wl12xx_queue_recovery_work(wl); goto out; } -- 2.25.1