mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
Bluetooth: qca: Fix error code in qca_read_fw_build_info()
[ Upstream commita189f0ee66
] Return -ENOMEM on allocation failure. Don't return success. Fixes:cda0d6a198
("Bluetooth: qca: fix info leak when fetching fw build id") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e231034377
commit
dfde465d89
@ -148,8 +148,10 @@ static int qca_read_fw_build_info(struct hci_dev *hdev)
|
||||
}
|
||||
|
||||
build_label = kstrndup(&edl->data[1], build_lbl_len, GFP_KERNEL);
|
||||
if (!build_label)
|
||||
if (!build_label) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
hci_set_fw_info(hdev, "%s", build_label);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user