Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bf07b7c authored by Mayank Rana's avatar Mayank Rana
Browse files

usb: gadget: Fix error handling when memory allocation fails



alloc_rmnet_ctrl_pkt() API may return ERR_PTR(-ENOMEM) if memory
allocation fails. qti_ctrl_queue_notify() API is checking against
NULL value only. Hence make sure that list_add() operation is not
performed with unallocated cpkt. This change fixes NULL pointer
derefernce with __list_add.

CRs-Fixed: 958316
Change-Id: I0ffbd9b804e348e26f5b8f68aac8a315fcc827ca
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 1c2c6d7f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment