summaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-09-20 13:18:19 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-25 20:09:19 +0200
commitbbbecc644a4fff76e8c89b9859701bdcde198d9c (patch)
tree40d7714288f4a5a1efa04547d489e6b6e4e14565 /drivers/hwtracing
parent1cf11385f354acbadd20f55e41be9bb1db8b1b2c (diff)
downloadblackbird-obmc-linux-bbbecc644a4fff76e8c89b9859701bdcde198d9c.tar.gz
blackbird-obmc-linux-bbbecc644a4fff76e8c89b9859701bdcde198d9c.zip
coresight: Remove redundant null pointer check before of_node_put and put_device
of_node_put and put_device has taken the null pointer check into account. So it is safe to remove the duplicated check. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing')
-rw-r--r--drivers/hwtracing/coresight/of_coresight.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c
index da71c975e3f7..89092f83567e 100644
--- a/drivers/hwtracing/coresight/of_coresight.c
+++ b/drivers/hwtracing/coresight/of_coresight.c
@@ -219,12 +219,9 @@ static int of_coresight_parse_endpoint(struct device *dev,
ret = 1;
} while (0);
- if (rparent)
- of_node_put(rparent);
- if (rep)
- of_node_put(rep);
- if (rdev)
- put_device(rdev);
+ of_node_put(rparent);
+ of_node_put(rep);
+ put_device(rdev);
return ret;
}
OpenPOWER on IntegriCloud