From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29B701B86E9; Wed, 19 Feb 2025 09:10:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739956232; cv=none; b=PPYggkvKpOEtj2FCKskXSJbV8iFJNcOr+mSKwnpOUox8oOvWfUhxT3H3vHt2Gg767QkkZLOMD6xRQ0KSFSTPXlnGK85Atm/eC2rc5BcOImTJbeiexr1KOV0qf5pOol9Fooo4taBgy5TYzQvrQrr3+Df3+n69RRP6xGQ4BsM4Xh8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739956232; c=relaxed/simple; bh=Ny8c27ld906n1E4YEm5P6tLeimZxADCpj71OZaXtCas=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nP1YAffM05PkgyvpytoRq1qFDw5ztJpmI+ZeQwgMoJSbQAnqhUF9WpVr0j5niSL180C0m62AwWFTyIFIM6RImPSnqoX/CsQYpwlzF/gXo4y7ztGXGpkKH6fyYiiy7ZDTz1/55eeJb7VeA+QiWFlV+4h3uD9ULz6Qv+uvhxcGBX4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=E4s/bWOV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="E4s/bWOV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E74CC4CEE8; Wed, 19 Feb 2025 09:10:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739956232; bh=Ny8c27ld906n1E4YEm5P6tLeimZxADCpj71OZaXtCas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E4s/bWOVzfh/MC0YmwW/w3f7XJKZ0X7BeYA/LUnJdjse5EPPg4RaIV+g9QXaMltF7 CnjzqND3GkpIL2uYI4VqrqJmTRMAOV7WiJRCTobtwxLYJNZM5O+K1r2tYmXqfI2j67 SQGo+7MpqWWVxcFWSk9v/MqbgXQt6VhuoyK7teR8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andreas Kemnade , Michael Nemanov , Kalle Valo , Sasha Levin Subject: [PATCH 6.1 078/578] wifi: wlcore: fix unbalanced pm_runtime calls Date: Wed, 19 Feb 2025 09:21:22 +0100 Message-ID: <20250219082656.022400600@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250219082652.891560343@linuxfoundation.org> References: <20250219082652.891560343@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andreas Kemnade [ Upstream commit 996c934c8c196144af386c4385f61fcd5349af28 ] If firmware boot failes, runtime pm is put too often: [12092.708099] wlcore: ERROR firmware boot failed despite 3 retries [12092.708099] wl18xx_driver wl18xx.1.auto: Runtime PM usage count underflow! Fix that by redirecting all error gotos before runtime_get so that runtime is not put. Fixes: c40aad28a3cf ("wlcore: Make sure firmware is initialized in wl1271_op_add_interface()") Signed-off-by: Andreas Kemnade Reviewed-by: Michael Nemanov Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20250104195507.402673-1-akemnade@kernel.org Signed-off-by: Sasha Levin --- drivers/net/wireless/ti/wlcore/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 28c0f06e311f7..b88ceb1f9800c 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -2533,24 +2533,24 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw, if (test_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags) || test_bit(WLVIF_FLAG_INITIALIZED, &wlvif->flags)) { ret = -EBUSY; - goto out; + goto out_unlock; } ret = wl12xx_init_vif_data(wl, vif); if (ret < 0) - goto out; + goto out_unlock; wlvif->wl = wl; role_type = wl12xx_get_role_type(wl, wlvif); if (role_type == WL12XX_INVALID_ROLE_TYPE) { ret = -EINVAL; - goto out; + goto out_unlock; } ret = wlcore_allocate_hw_queue_base(wl, wlvif); if (ret < 0) - goto out; + goto out_unlock; /* * TODO: after the nvs issue will be solved, move this block @@ -2565,7 +2565,7 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw, ret = wl12xx_init_fw(wl); if (ret < 0) - goto out; + goto out_unlock; } /* -- 2.39.5