coresight: fixing validity check on remote device

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>
This commit is contained in:
Kaixu Xia 2015-01-09 16:57:22 -07:00 committed by Greg Kroah-Hartman
parent f7c55298f1
commit 2ccffaf92e

View 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);