spi: fix device-node leaks
authorJohan Hovold <johan@kernel.org>
Mon, 30 Jan 2017 16:47:05 +0000 (17:47 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 31 Jan 2017 21:00:58 +0000 (21:00 +0000)
commit8324147f38019865b29d03baf28412d2ec0bd828
tree4f13ea84e653d9b69d58d8b31c238dd8dfec61ff
parent31ae779421098e9a58a3f10e1e09b2c63f4514fa
spi: fix device-node leaks

Make sure to release the device-node reference taken in
of_register_spi_device() on errors and when deregistering the device.

Fixes: 284b01897340 ("spi: Add OF binding support for SPI busses")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c