Commit 87c2a2a7 authored by Wei Yongjun's avatar Wei Yongjun Committed by Marcel Holtmann
Browse files

Bluetooth: hci_qca: Use vfree() instead of kfree()



Use vfree() instead of kfree() to free vmalloc()
allocated data.

Fixes: d841502c ("Bluetooth: hci_qca: Collect controller memory dump during SSR")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: default avatarBalakrishna Godavarthi <bgodavar@codeaurora.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 788d10c0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -529,7 +529,7 @@ static void hci_memdump_timeout(struct timer_list *t)
	bt_dev_err(hu->hdev, "clearing allocated memory due to memdump timeout");
	/* Inject hw error event to reset the device and driver. */
	hci_reset_dev(hu->hdev);
	kfree(memdump_buf);
	vfree(memdump_buf);
	kfree(qca_memdump);
	qca->memdump_state = QCA_MEMDUMP_TIMEOUT;
	del_timer(&qca->memdump_timer);
@@ -1437,7 +1437,7 @@ static void qca_wait_for_dump_collection(struct hci_dev *hdev)
		bt_dev_err(hu->hdev, "Clearing the buffers due to timeout");
		if (qca_memdump)
			memdump_buf = qca_memdump->memdump_buf_tail;
		kfree(memdump_buf);
		vfree(memdump_buf);
		kfree(qca_memdump);
		qca->memdump_state = QCA_MEMDUMP_TIMEOUT;
		del_timer(&qca->memdump_timer);