* [PATCH] pwm: pwm-mxs: Check the return value from stmp_reset_block()
@ 2013-07-10 2:25 Fabio Estevam
2013-07-29 12:24 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2013-07-10 2:25 UTC (permalink / raw)
To: thierry.reding; +Cc: shawn.guo, linux-pwm, Fabio Estevam
From: Fabio Estevam <fabio.estevam@freescale.com>
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>
---
drivers/pwm/pwm-mxs.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/pwm-mxs.c
index 2c77b81..c2c5a4f 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)
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)
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pwm: pwm-mxs: Check the return value from stmp_reset_block()
2013-07-10 2:25 [PATCH] pwm: pwm-mxs: Check the return value from stmp_reset_block() Fabio Estevam
@ 2013-07-29 12:24 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2013-07-29 12:24 UTC (permalink / raw)
To: Fabio Estevam; +Cc: shawn.guo, linux-pwm, Fabio Estevam
[-- Attachment #1: Type: text/plain, Size: 421 bytes --]
On Tue, Jul 09, 2013 at 11:25:37PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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>
> ---
> drivers/pwm/pwm-mxs.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
Applied, thanks.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-29 12:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-10 2:25 [PATCH] pwm: pwm-mxs: Check the return value from stmp_reset_block() Fabio Estevam
2013-07-29 12:24 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).