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=unavailable 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 878EAC47423 for ; Tue, 29 Sep 2020 12:24:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3BF112076A for ; Tue, 29 Sep 2020 12:24:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601382243; bh=gizUYms1avGM+a5KK5WcbtwwMjQvvFthjI3iF6v7Uz4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Hz74Ri0SHgQux1PQ1+fTy80+cxpvLLI39Ep4G9Fq8iPE9kDyD+Y1i+rqeWoG/f9L3 7rWM+/Q2d8lEchZM5VTgR8CRjoDJOrhZBLNt7c4cih0dEctzA9xWNFpVZuuPUuiO8C 8Y2vwDDEBo/ocavvoEWAz8EriCEv1MzK0nJZJ1ac= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732602AbgI2MXm (ORCPT ); Tue, 29 Sep 2020 08:23:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:46898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729760AbgI2LfJ (ORCPT ); Tue, 29 Sep 2020 07:35:09 -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 34B4A23C43; Tue, 29 Sep 2020 11:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601378912; bh=gizUYms1avGM+a5KK5WcbtwwMjQvvFthjI3iF6v7Uz4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=11/9sx2ZO090zSRRSbL/ZxRogpqi9FBXdNigEhniVTODSctsyqBv6BKV6is3xGIDq 91fXgR8Q/OWQQk7+Lq3lmiEEy6NsTGlF8mmNDp+y68y9DaSdyR4D3v2VNctFadoVXe GuwhNE/uls+Dg0H0TzjK/OS4yICEaUPFxbac/gfU= 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 4.19 185/245] wlcore: fix runtime pm imbalance in wl1271_tx_work Date: Tue, 29 Sep 2020 13:00:36 +0200 Message-Id: <20200929105955.977392462@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929105946.978650816@linuxfoundation.org> References: <20200929105946.978650816@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: stable@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 b6e19c2d66b0a..250bcbf4ea2f2 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c @@ -877,6 +877,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