mei: amthif: clean command queue upon disconnection
authorTomas Winkler <tomas.winkler@intel.com>
Fri, 27 Jan 2017 14:32:43 +0000 (16:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Jan 2017 10:07:43 +0000 (11:07 +0100)
commit6537ae2f20412dd1c7464272dfff77d5afb50d25
tree66177fb43e2cf7ca1ddc7d32bfc03eadded55474
parent6c0d6701a551ac344e63935535db0494110c5f4e
mei: amthif: clean command queue upon disconnection

In order to prevent memory leak clean up the amthif command
queue upon disconnection. The issue may happen only on error path
as the command queue is cleaned upon file descriptor close.
And remove the cleanup from mei_cl_flush_queues as this code
is never reached for amthif client.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/client.c