diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-01-09 01:13:00 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-25 11:46:42 +0100 |
commit | 8333eb153a9fd86028abd0942c6aec0705764410 (patch) | |
tree | 9753f0d26f649d911c07047a923abea07f3c3f5a /drivers/w1 | |
parent | 27a7e2a72c02785156ca3876bd7ca57f56a433ff (diff) | |
download | op-kernel-dev-8333eb153a9fd86028abd0942c6aec0705764410.zip op-kernel-dev-8333eb153a9fd86028abd0942c6aec0705764410.tar.gz |
w1: omap_hdq: Free resources on error path
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>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r-- | drivers/w1/masters/omap_hdq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index bb09de6..fb190c2 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); |