Commit cfb9e4c4 authored by Fabio Estevam's avatar Fabio Estevam Committed by 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: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment