thunderbolt: property: Fix a missing check of kzalloc
authorKangjie Lu <kjlu@umn.edu>
Mon, 25 Mar 2019 20:23:08 +0000 (15:23 -0500)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 28 Mar 2019 08:30:47 +0000 (11:30 +0300)
commit6183d5a51866f3acdeeb66b75e87d44025b01a55
treedeb7832ddcc320a2e31509df57b4e86308b12061
parent48f40b96de2c790eac6114e3e879a48fe9f89349
thunderbolt: property: Fix a missing check of kzalloc

No check is enforced for the return value of kzalloc,
which may lead to NULL-pointer dereference.

The patch fixes this issue.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/property.c