aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2018-08-27 15:40:15 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-12 03:14:24 -0400
commit69bf5313035926b0b6a6578de4f3168a8f5c19b8 (patch)
tree188717caf91dd6bbd1d8c8471503b0167aada0ac
parentc1a214ad82d7ac6f19fe48f90b13403b40ead9dc (diff)
mei: bus: fix hw module get/put balance
In case the device is not connected it doesn't 'get' hw module and hence should not 'put' it on disable. Cc: <stable@vger.kernel.org> 4.16+ Fixes:'commit 257355a44b99 ("mei: make module referencing local to the bus.c")' Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200455 Tested-by: Georg Müller <georgmueller@gmx.net> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/misc/mei/bus.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 7bba62a72921..13c6c9a2248a 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -616,9 +616,8 @@ int mei_cldev_disable(struct mei_cl_device *cldev)
616 if (err < 0) 616 if (err < 0)
617 dev_err(bus->dev, "Could not disconnect from the ME client\n"); 617 dev_err(bus->dev, "Could not disconnect from the ME client\n");
618 618
619out:
620 mei_cl_bus_module_put(cldev); 619 mei_cl_bus_module_put(cldev);
621 620out:
622 /* Flush queues and remove any pending read */ 621 /* Flush queues and remove any pending read */
623 mei_cl_flush_queues(cl, NULL); 622 mei_cl_flush_queues(cl, NULL);
624 mei_cl_unlink(cl); 623 mei_cl_unlink(cl);