Skip to content
Commit 3cc1c6de authored by Xiaoke Wang's avatar Xiaoke Wang Committed by Mika Westerberg
Browse files

thunderbolt: Check return value of kmemdup() in icm_handle_event()



kmemdup() may return NULL if there is not enough memory available. Check
this and bail out early in this case. While there move INIT_WORK() to
happen after we have allocated all the memory needed for the event
handling to avoid doing unnecessary work.

Signed-off-by: default avatarXiaoke Wang <xkernel.wang@foxmail.com>
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent fea783e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment