spi: fix parent-device reference leak
authorJohan Hovold <johan@kernel.org>
Mon, 14 Dec 2015 15:16:19 +0000 (16:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Feb 2016 22:22:38 +0000 (14:22 -0800)
commit1dcdf54f2426085c65f00a171259da0f1bd6fd93
treeae32528c3bfd2df440c753de8fda6d86fba5e0bb
parent092f4b70fe24ef591430e5111ebeffb67ec241eb
spi: fix parent-device reference leak

commit 157f38f993919b648187ba341bfb05d0e91ad2f6 upstream.

Fix parent-device reference leak due to SPI-core taking an unnecessary
reference to the parent when allocating the master structure, a
reference that was never released.

Note that driver core takes its own reference to the parent when the
master device is registered.

Fixes: 49dce689ad4e ("spi doesn't need class_device")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi.c