summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}