]> 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)
committerZefan Li <lizefan@huawei.com>
Wed, 26 Oct 2016 15:15:38 +0000 (23:15 +0800)
commit1b17302a80d89c84ea3bdf7205ae363b7c12e3b7
tree039cc2d3ae2cfa8e87006beea24a245d495d91e4
parent325c0423cb71364f51ac9d6f33739378ee19001b
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: Zefan Li <lizefan@huawei.com>
drivers/spi/spi.c