浏览代码

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>
Kaixu Xia 10 年之前
父节点
当前提交
2ccffaf92e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/coresight/of_coresight.c

+ 1 - 1
drivers/coresight/of_coresight.c

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