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:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment