mei: do not pin module if cldrv->probe() failed
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 1 Apr 2016 20:53:01 +0000 (23:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Apr 2016 21:08:08 +0000 (14:08 -0700)
commitb9c79543efcd0235d2fc1485c31ec9e9584f3ad7
tree5446ba70594fa21d2b8b7509e2ea9541cc8783ea
parentbd83a4ab569ddfc71a82fb0dd002f353b67df7df
mei: do not pin module if cldrv->probe() failed

If cldrv->probe() failed in mei_cl_device_probe(),
the mei module is left pinned.

The patch moves __module_get(THIS_MODULE) after cldrv->probe().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/bus.c