Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9115575pxu; Mon, 28 Dec 2020 07:02:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvuE3Rpfh4Ge5t8dGRw3RA/QnqGrcgQzZKsmTbje+EmmY7NgfEXgp7jA//JYUiN2h7F6qW X-Received: by 2002:a17:906:d62:: with SMTP id s2mr41968785ejh.61.1609167773729; Mon, 28 Dec 2020 07:02:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609167773; cv=none; d=google.com; s=arc-20160816; b=ddeIoDJEXaZiYgbVHnaRYybxSXxVHy1Yzp8rwdOAVl0eiDoy5G6vq3aRMTqMytH7uT 8SvCeF7eiDgqadtcphteWSRsVqtBMQORan2QEBQqTocjYEK3VHa+TcfEP1XGJrD7uHWR Ke74Dn3ZBIg264Wtn1VmEizgLFIMEUZGGs9inYoAaTHlfpfgtrKkLs3e9SKQeTuNhK+7 IOmobBoGD6e4xU6IlM0KJRvnqu0V8thQnsgBuY0vwdaxx0CY0LyVdCXj0CAv9LubzCJN P7hqYZxt6daHDwdyaikOKHtX7U+f5DJzEOowa1DCssEW2DpYLzCYoXOE/WcF+kYGGWgQ a/MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=K5EIkBhQlIJ9YiANVGOB9p5OJ4ecLgVXmmZ0mLz9ffY=; b=cPT1ryuAn3QOg7ME7WluQ9dAPHsdwqiBDc/lYaO25+g2IcPIIjIk1tuEOZeMuzRzPE Jbulni6XN3n9RI5VJprRRsYgvf2Q6s05PDked7G0SRPyJt6sZluHburflb9ThIJNLHgW KHlr3TVeX8zHZ9mxnPjc0Awgk1DJxnChz43AyNI8oBFjwdq6zT7thticKSLayAxOUEyp W/CqkdG8Boza9xUO75Ta6m+ZrbJXBTld3cOE4ybpvFfddMUSVH3rEnl8aGq3iPjXxL1V 92QqdqcW7VCMG2luZlZzQCbkI1xRaEyU7uHZo7pcEXrrzVNh9732P8SsIVcETg5XzPNA ukmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IAuIwDq+; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt28si20398869edb.269.2020.12.28.07.02.25; Mon, 28 Dec 2020 07:02:53 -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 header.i=@linuxfoundation.org header.s=korg header.b=IAuIwDq+; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438018AbgL1O5y (ORCPT + 99 others); Mon, 28 Dec 2020 09:57:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:48914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440624AbgL1OPU (ORCPT ); Mon, 28 Dec 2020 09:15:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 11D2B20731; Mon, 28 Dec 2020 14:15:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164904; bh=QUCzMLjXo7RbE+T5uGyeAbkNHSENdxL1Gl/rAZhHAiE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IAuIwDq+LrWoUuzSfs8DhZpBtnosmAvpFeae3CnsdXyLyUSwqD/jo75HqSmFVoM0J dwOdY4pAPhItyDF0q5hAI26pDjI/yV31f+1vPkjDAiaW2DOIB6lt7TsbpZNojG36Ci c10K4H9B77PfO46Tml0/ctJXblbmfIR9CtM9uS3k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jing Xiangfeng , Marcel Holtmann , Johan Hedberg , Sasha Levin Subject: [PATCH 5.10 339/717] Bluetooth: btmtksdio: Add the missed release_firmware() in mtk_setup_firmware() Date: Mon, 28 Dec 2020 13:45:37 +0100 Message-Id: <20201228125037.263315306@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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: Jing Xiangfeng [ Upstream commit b73b5781a85c03113476f62346c390f0277baa4b ] mtk_setup_firmware() misses to call release_firmware() in an error path. Jump to free_fw to fix it. Fixes: 737cd06072a7 ("Bluetooth: btmtksdio: fix up firmware download sequence") Signed-off-by: Jing Xiangfeng Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg Signed-off-by: Sasha Levin --- drivers/bluetooth/btmtksdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c index ba45c59bd9f36..5f9f027956317 100644 --- a/drivers/bluetooth/btmtksdio.c +++ b/drivers/bluetooth/btmtksdio.c @@ -704,7 +704,7 @@ static int mtk_setup_firmware(struct hci_dev *hdev, const char *fwname) err = mtk_hci_wmt_sync(hdev, &wmt_params); if (err < 0) { bt_dev_err(hdev, "Failed to power on data RAM (%d)", err); - return err; + goto free_fw; } fw_ptr = fw->data; -- 2.27.0