提交 fb2cb3bf 编写于 作者: U Uwe Kleine-König 提交者: Thierry Reding

pwm: vt8500: Drop if with an always false condition

vt8500_pwm_remove() is only called after vt8500_pwm_probe() returned
successfully. In this case driver data was set to a non-NULL value
and so chip can never be NULL.

While touching this code also put declaration and assignment in a single
line.
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 2f1a3bd4
......@@ -238,11 +238,8 @@ static int vt8500_pwm_probe(struct platform_device *pdev)
static int vt8500_pwm_remove(struct platform_device *pdev)
{
struct vt8500_chip *chip;
struct vt8500_chip *chip = platform_get_drvdata(pdev);
chip = platform_get_drvdata(pdev);
if (chip == NULL)
return -ENODEV;
clk_unprepare(chip->clk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册