diff options
| author | Markus Elfring <elfring@users.sourceforge.net> | 2015-02-03 05:54:28 -0500 |
|---|---|---|
| committer | Thierry Reding <thierry.reding@gmail.com> | 2015-02-03 06:56:54 -0500 |
| commit | 8d6cc0738540f97edb021d3b76a4367519f1e5f1 (patch) | |
| tree | 86c71ebc80316893579cba726c9cb44c0355bca7 | |
| parent | 9c959bfe00396bc2e6143dc9a8b27feaffb78c74 (diff) | |
pwm: Remove unnecessary check before 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: Thierry Reding <thierry.reding@gmail.com>
| -rw-r--r-- | drivers/pwm/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 966497d10c6e..810aef3f4c3e 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c | |||
| @@ -192,7 +192,7 @@ static void of_pwmchip_add(struct pwm_chip *chip) | |||
| 192 | 192 | ||
| 193 | static void of_pwmchip_remove(struct pwm_chip *chip) | 193 | static void of_pwmchip_remove(struct pwm_chip *chip) |
| 194 | { | 194 | { |
| 195 | if (chip->dev && chip->dev->of_node) | 195 | if (chip->dev) |
| 196 | of_node_put(chip->dev->of_node); | 196 | of_node_put(chip->dev->of_node); |
| 197 | } | 197 | } |
| 198 | 198 | ||
