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 EFEDE168CF for ; Mon, 8 May 2023 11:15:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EF80C433EF; Mon, 8 May 2023 11:15:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1683544513; bh=CqdxlRARtYRWkig4nDgeWSsNt9j2F+l3MZQ9Ubx3IXQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JwQQXCM6DAyW3X+BJDxppl/wIJ03Co3D2KG/AkXnVO87tHA6YLIPDqxFGyNTUalAj qPLBTz1sVr0HELLPv7Pw2AWFyYX9+SbAFN16GKxu48lxvgLpDeOib9iWrBtCk5dUVr Egnz3V7FvwvxZTc4gO5BrVduu6OAoTxat3/0pBbU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Dan Carpenter , Lorenzo Bianconi , Felix Fietkau , Sasha Levin Subject: [PATCH 6.3 434/694] wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store() Date: Mon, 8 May 2023 11:44:29 +0200 Message-Id: <20230508094447.482356835@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230508094432.603705160@linuxfoundation.org> References: <20230508094432.603705160@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Dan Carpenter [ Upstream commit cdc215c2c8d74b3c8886650e979b47f16c1f7f92 ] Drop the lock before returning -EINVAL. Fixes: ecaccdae7a7e ("wifi: mt76: mt7915: rework mt7915_thermal_temp_store()") Signed-off-by: Dan Carpenter Acked-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c index 5e288116b1b01..4f3efc942a4d8 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c @@ -89,6 +89,7 @@ static ssize_t mt7915_thermal_temp_store(struct device *dev, val < phy->throttle_temp[MT7915_CRIT_TEMP_IDX])) { dev_err(phy->dev->mt76.dev, "temp1_max shall be greater than temp1_crit."); + mutex_unlock(&phy->dev->mt76.mutex); return -EINVAL; } -- 2.39.2