Jelajahi Sumber

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 tahun lalu
induk
melakukan
2ccffaf92e
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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);