thunderbolt: Fix to check return value of ida_simple_get
authorAditya Pakki <pakki001@umn.edu>
Wed, 20 Mar 2019 16:34:09 +0000 (11:34 -0500)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 22 Mar 2019 10:26:01 +0000 (13:26 +0300)
commit9aabb68568b473bf2f0b179d053b403961e42e4d
tree8dc07888afcc3d562ab9eabb4b02a3d694c8c2e7
parent2cc12751cf464a722ff57b54d17d30c84553f9c0
thunderbolt: Fix to check return value of ida_simple_get

In enumerate_services, ida_simple_get on failure can return an error and
leaks memory. The patch ensures that the dev_set_name is set on non
failure cases, and releases memory during failure.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/xdomain.c