]> git.karo-electronics.de Git - linux-beck.git/commitdiff
coresight: fixing validity check on remote device
authorKaixu Xia <xiakaixu@huawei.com>
Fri, 9 Jan 2015 23:57:22 +0000 (16:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Jan 2015 13:04:14 +0000 (05:04 -0800)
A validity check should be made on the remote device, i.e rdev,
rather than the current device.

Signed-off-by: Kaixu Xia <xiakaixu@huawei.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/coresight/of_coresight.c

index 89ebbe29ac97554286da8f307894aea5868a74b1..9a5ff56f34d9b87882373a82834a988547ed50ee 100644 (file)
@@ -174,7 +174,7 @@ struct coresight_platform_data *of_get_coresight_platform_data(
                                continue;
 
                        rdev = of_coresight_get_endpoint_device(rparent);
-                       if (!dev)
+                       if (!rdev)
                                continue;
 
                        pdata->child_names[i] = dev_name(rdev);