projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9da0175
)
pwm: mxs: Check the return value from stmp_reset_block()
author
Fabio Estevam
<fabio.estevam@freescale.com>
Wed, 10 Jul 2013 02:25:37 +0000
(23:25 -0300)
committer
Thierry Reding
<thierry.reding@gmail.com>
Tue, 3 Sep 2013 11:07:51 +0000
(13:07 +0200)
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>
drivers/pwm/pwm-mxs.c
patch
|
blob
|
history
diff --git
a/drivers/pwm/pwm-mxs.c
b/drivers/pwm/pwm-mxs.c
index 2c77b81da7c4a7fb50c70f94904ad5312a791a85..c2c5a4fd1b96bb4eede5bdd553911e3da66dee5e 100644
(file)
--- 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)
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)