]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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:28:25 +0000 (14:28 -0800)
commited4c745d35785c4f5501a87f9d214ead4fcef203
treeea1a9d9e342ca44c5d55558db7d527dc7a1b3ceb
parent6edfb956228a5cfbbb9e5dd9c4488cc93b3cfe91
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