From: Christopher William Snowhill Date: Sun, 27 Dec 2020 03:12:32 +0000 (-0800) Subject: Bluetooth: Fix initializing response id after clearing struct X-Git-Tag: v5.12-rc1~200^2~74^2~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a5687c644015a097304a2e47476c0ecab2065734;p=thirdparty%2Fkernel%2Flinux.git Bluetooth: Fix initializing response id after clearing struct Looks like this was missed when patching the source to clear the structures throughout, causing this one instance to clear the struct after the response id is assigned. Fixes: eddb7732119d ("Bluetooth: A2MP: Fix not initializing all members") Signed-off-by: Christopher William Snowhill Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c index da7fd7c8c2dc0..cc26e4c047ad0 100644 --- a/net/bluetooth/a2mp.c +++ b/net/bluetooth/a2mp.c @@ -381,9 +381,9 @@ static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb, hdev = hci_dev_get(req->id); if (!hdev || hdev->amp_type == AMP_TYPE_BREDR || tmp) { struct a2mp_amp_assoc_rsp rsp; - rsp.id = req->id; memset(&rsp, 0, sizeof(rsp)); + rsp.id = req->id; if (tmp) { rsp.status = A2MP_STATUS_COLLISION_OCCURED;