Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9086852pxu; Mon, 28 Dec 2020 06:18:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNw35XNnQz7swQjwATsnBYlSju1dE0S61AY2GMFIr+11N09r7nrWk5VDqtERpWJSif5UDN X-Received: by 2002:a50:fb1a:: with SMTP id d26mr42333646edq.101.1609165125309; Mon, 28 Dec 2020 06:18:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165125; cv=none; d=google.com; s=arc-20160816; b=Zh24OJOnsoNN9UqI0/QFe5/6FjpypNYicaWohgrCyDZSHtrLPz601HimtpI6tP9TJ4 CZACjRLUvaty8IvgsyTao1qkN0HTMebG/fmWyjbEeMjE7bes+O8ji3lB+M6HvhlZeI3W mnQmr5Axy+B9oprJxEA10+U274Tuq15agYOj3p4/rwX5Oy1v7fTCJ3PkNPC/kvUj2gGz KhtIAk0hrb2gF15RSyHdJuHxJuoMd3h92Hivs85u4p9AXLi2c3B8atNC+V3jisELPbFV iBUthp5S0/myY9KJRW8qOf45fPZ1j16cwMOd6JRWRFuWLgxOtp/UepmAE4oWOz2acc2l 82aA== 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=YYQUDSzmzF6eZ6dW3VC0Q7yesPxiSh7b5/XJbOqikbE=; b=uYR5NjBzzEEguQosGxIhklTqkeTfvl7qV+JOf7SpYhEmCvcm5LyJmSR5NqC+cUt2n0 HtEsDlMvDmXi7RTi8Ja3sukq25hma3qSPYvYuObwsZD9yCIR6puQMaLdpzANPX+xJTBo e3gidP8wWm8Z7O5HHSkqEkZvTVFil3B+RSQftI56ib3JV8hjAg/wxJeg0vV2FGXu5mqw t6u6nPJvb0BOGNbpD6nfe9TA5YSSHLRYfy54P1Jmjgcw9mgqH6hIu/mCQ/hgoZPJLCVf aa1dfvgGMGSRFF2ZfYW1CFjOEBBabv6S1LK2ZoPBSIanv/NxbENbcVCL2RLPnLMo8Umo MAEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cxPQmreN; 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 h8si18750991ejf.491.2020.12.28.06.18.22; Mon, 28 Dec 2020 06:18:45 -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=cxPQmreN; 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 S2440746AbgL1OPs (ORCPT + 99 others); Mon, 28 Dec 2020 09:15:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:50622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440721AbgL1OPm (ORCPT ); Mon, 28 Dec 2020 09:15:42 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E6B3221D94; Mon, 28 Dec 2020 14:15:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164901; bh=LESRNoLnrgKCZu3BkKCQUvmXtiRK7LFBQ1IWXDI4R08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cxPQmreNt71Qx6beoTitQXBPiNt+NFuaooKMlynh9o5gpu5L3I1Rw/RMSCRDn3lkj IkC7bBJF7yihtx54jTjUolP9jy/fYaWFMFZ+uMvh9o+PhSXJiG97Fhm1D9Y01+/G4d eSsG6fYISv2oqRJIBakB6XbNwM92r8i1gNHjHpyE= 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 338/717] Bluetooth: btusb: Add the missed release_firmware() in btusb_mtk_setup_firmware() Date: Mon, 28 Dec 2020 13:45:36 +0100 Message-Id: <20201228125037.217743756@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 d1e9d232e1e60fa63df1b836ec3ecba5abd3fa9d ] btusb_mtk_setup_firmware() misses to call release_firmware() in an error path. Jump to err_release_fw to fix it. Fixes: f645125711c8 ("Bluetooth: btusb: 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/btusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 1005b6e8ff743..a9981678199d7 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -3067,7 +3067,7 @@ static int btusb_mtk_setup_firmware(struct hci_dev *hdev, const char *fwname) err = btusb_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 err_release_fw; } fw_ptr = fw->data; -- 2.27.0