提交 cfb9e4c4 编写于 作者: F Fabio Estevam 提交者: Thierry Reding

pwm: mxs: Check the return value from stmp_reset_block()

stmp_reset_block() may fail, so let's check its return value and
propagate it in the case of error.
Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 9da01759
......@@ -161,9 +161,15 @@ static int mxs_pwm_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, mxs);
stmp_reset_block(mxs->base);
ret = stmp_reset_block(mxs->base);
if (ret)
goto pwm_remove;
return 0;
pwm_remove:
pwmchip_remove(&mxs->chip);
return ret;
}
static int mxs_pwm_remove(struct platform_device *pdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册