Skip to content

Commit

Permalink
w1: omap_hdq: Free resources on error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christophe JAILLET authored and Greg Kroah-Hartman committed Jan 25, 2017
1 parent 27a7e2a commit 8333eb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/w1/masters/omap_hdq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8333eb1

Please sign in to comment.