mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
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>
This commit is contained in:
parent
1cf11385f3
commit
bbbecc644a
1 changed files with 3 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue