diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-07-19 22:42:22 +0200 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2016-08-09 12:36:27 -0500 |
commit | beab47d55b883e85bec7771a899ac791c6f92c80 (patch) | |
tree | d833875e56de6d384ba03ee964f325d4664ed3be /drivers/of | |
parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (diff) |
of: Delete an unnecessary check before the function call "of_node_put"
The of_node_put() function tests whether its argument is NULL
and then returns immediately.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/base.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index 7792266db259..cb255a07baa0 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1631,8 +1631,7 @@ static int __of_parse_phandle_with_args(const struct device_node *np, */ err: - if (it.node) - of_node_put(it.node); + of_node_put(it.node); return rc; } |