greybus: spi: unregister master on device add fail
authorRui Miguel Silva <rui.silva@linaro.org>
Tue, 15 Dec 2015 19:09:56 +0000 (19:09 +0000)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 15 Dec 2015 22:32:12 +0000 (14:32 -0800)
commit4a0c4453e3f99335db3e7786b1a66e3b6cfa0653
tree6af379d7599e98c95497c06fa9531654096324c4
parenta92a2d46acd0bfb97ba409d9d663c270cb240715
greybus: spi: unregister master on device add fail

When registering devices if any of it fail, just cleanup and release spi
master.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Reported-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/spi.c