thunderbolt: property: Fix a NULL pointer dereference
authorKangjie Lu <kjlu@umn.edu>
Tue, 12 Mar 2019 08:33:28 +0000 (03:33 -0500)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 20 Mar 2019 10:37:12 +0000 (13:37 +0300)
commit106204b56f60abf1bead7dceb88f2be3e34433da
tree6ee50978ea524c4ff0b5b0ef25772f93a78a8b35
parent9e98c678c2d6ae3a17cb2de55d17f69dddaa231b
thunderbolt: property: Fix a NULL pointer dereference

In case kzalloc fails, the fix releases resources and returns
-ENOMEM to avoid the NULL pointer dereference.

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