diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-07-25 11:29:59 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-07-26 12:09:55 -0700 |
commit | 887ec0bfbd146c08e34ccb65a8f4251dc110e52f (patch) | |
tree | 1c2a6f7d7ee75f4044821265e3e94ead4c7139b8 /drivers/input | |
parent | 8f97f8e58bd385d3c863a0437eae21a3ca7cc5d8 (diff) | |
download | linux-stable-887ec0bfbd146c08e34ccb65a8f4251dc110e52f.tar.gz linux-stable-887ec0bfbd146c08e34ccb65a8f4251dc110e52f.tar.bz2 linux-stable-887ec0bfbd146c08e34ccb65a8f4251dc110e52f.zip |
Input: synaptics-rmi4 - do not check for NULL when calling 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: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/rmi4/rmi_bus.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/input/rmi4/rmi_bus.c b/drivers/input/rmi4/rmi_bus.c index 253df96be427..a73580654c6b 100644 --- a/drivers/input/rmi4/rmi_bus.c +++ b/drivers/input/rmi4/rmi_bus.c @@ -232,10 +232,7 @@ err_put_device: void rmi_unregister_function(struct rmi_function *fn) { device_del(&fn->dev); - - if (fn->dev.of_node) - of_node_put(fn->dev.of_node); - + of_node_put(fn->dev.of_node); put_device(&fn->dev); } |