mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
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: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
parent
9da0175963
commit
cfb9e4c40e
1 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue