mux: core: fix double get_device()
authorHans de Goede <hdegoede@redhat.com>
Thu, 28 Dec 2017 23:22:54 +0000 (00:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Jan 2018 13:19:41 +0000 (14:19 +0100)
commitaa1f10e85b0ab53dee85d8e293c8159d18d293a8
tree17f0b76f442b515fc12a0d2055e520997d89a851
parent06e7e776ca4d36547e503279aeff996cbb292c16
mux: core: fix double get_device()

class_find_device already does a get_device on the returned device.
So the device returned by of_find_mux_chip_by_node is already referenced
and we should not reference it again (and unref it on error).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Rosin <peda@axentia.se>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mux/core.c