diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2013-07-09 22:25:37 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2013-09-03 07:07:51 -0400 |
commit | cfb9e4c40e87dffdce96d3a95c33d01f441b2470 (patch) | |
tree | ee66cf7481b49aa44e7757c930a628c76e24f0ea /drivers | |
parent | 9da01759636f519967c0922ae12bd9fff739db9a (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pwm/pwm-mxs.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/pwm-mxs.c index 2c77b81da7c4..c2c5a4fd1b96 100644 --- a/drivers/pwm/pwm-mxs.c +++ b/drivers/pwm/pwm-mxs.c | |||
@@ -161,9 +161,15 @@ static int mxs_pwm_probe(struct platform_device *pdev) | |||
161 | 161 | ||
162 | platform_set_drvdata(pdev, mxs); | 162 | platform_set_drvdata(pdev, mxs); |
163 | 163 | ||
164 | stmp_reset_block(mxs->base); | 164 | ret = stmp_reset_block(mxs->base); |
165 | if (ret) | ||
166 | goto pwm_remove; | ||
165 | 167 | ||
166 | return 0; | 168 | return 0; |
169 | |||
170 | pwm_remove: | ||
171 | pwmchip_remove(&mxs->chip); | ||
172 | return ret; | ||
167 | } | 173 | } |
168 | 174 | ||
169 | static int mxs_pwm_remove(struct platform_device *pdev) | 175 | static int mxs_pwm_remove(struct platform_device *pdev) |