greybus: call put_device() on error
authorAlex Elder <elder@linaro.org>
Tue, 9 Sep 2014 18:55:06 +0000 (13:55 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 9 Sep 2014 22:09:06 +0000 (15:09 -0700)
commita5808add9a6cae290af60bb3b4efd2c9d3208588
treefaaa61ca26189d34b005c03804711b0c6e4b02c4
parentbadad68e3adc3d0b7cbfe66902cb21c97833e242
greybus: call put_device() on error

As soon as we've called device_initialize() we're required to call
put_device() in order to drop our reference to the device structure.
This was missed in the error path in greybus_new_module().  Fix that.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/core.c