From: Tomas Winkler Date: Mon, 27 Aug 2018 19:40:15 +0000 (+0300) Subject: mei: bus: fix hw module get/put balance X-Git-Tag: v4.19-rc4~17^2~8 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=69bf5313035926b0b6a6578de4f3168a8f5c19b8;p=users%2Fwilly%2Flinux.git 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: 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 Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- 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) if (err < 0) dev_err(bus->dev, "Could not disconnect from the ME client\n"); -out: mei_cl_bus_module_put(cldev); - +out: /* Flush queues and remove any pending read */ mei_cl_flush_queues(cl, NULL); mei_cl_unlink(cl);