lkml.org 
[lkml]   [2017]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] w1: omap_hdq: Free resources on error path
Date
In case of error returned by '_omap_hdq_reset()', free resources as done
elsewhere in this function.

This patch slighly changes the semantic of the code. It now propagates the
error code returned by '_omap_hdq_reset()' instead of returning -EINVAL
unconditionally.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/w1/masters/omap_hdq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index bb09de633939..fb190c259607 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -715,7 +715,7 @@ static int omap_hdq_probe(struct platform_device *pdev)
ret = _omap_hdq_reset(hdq_data);
if (ret) {
dev_dbg(&pdev->dev, "reset failed\n");
- return -EINVAL;
+ goto err_irq;
}

rev = hdq_reg_in(hdq_data, OMAP_HDQ_REVISION);
--
2.9.3
\
 
 \ /
  Last update: 2017-01-09 01:14    [W:0.056 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site