w1: omap_hdq: Free resources on error path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 9 Jan 2017 00:13:00 +0000 (01:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Jan 2017 10:46:42 +0000 (11:46 +0100)
commit8333eb153a9fd86028abd0942c6aec0705764410
tree9753f0d26f649d911c07047a923abea07f3c3f5a
parent27a7e2a72c02785156ca3876bd7ca57f56a433ff
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>
drivers/w1/masters/omap_hdq.c