提交 8d6cc073 编写于 作者: M Markus Elfring 提交者: Thierry Reding

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: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 9c959bfe
......@@ -192,7 +192,7 @@ static void of_pwmchip_add(struct pwm_chip *chip)
static void of_pwmchip_remove(struct pwm_chip *chip)
{
if (chip->dev && chip->dev->of_node)
if (chip->dev)
of_node_put(chip->dev->of_node);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册