]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: greybus: arche-platform: fix device reference leak
authorJohan Hovold <johan@kernel.org>
Tue, 1 Nov 2016 10:55:02 +0000 (11:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Nov 2016 10:45:42 +0000 (11:45 +0100)
commitd9966f1de990577b49903061cfcea2d1e85353fb
treeab1469c8b0f68f0286fb9a356c118a4f2441ae4a
parent55abe8165f31ffb83ce8b24da959b61362dca4c4
staging: greybus: arche-platform: fix device reference leak

Make sure to drop the device reference taken by of_find_device_by_node()
before returning from arche_platform_change_state().

Note that this code is expected to be removed, but let's fix up the leak
nonetheless.

Fixes: 886aba558b9e ("greybus: arche-platform: Export fn to allow...")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Vaibhav Hiremath <hvaibhav.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/arche-platform.c