mei: fix NULL dereferencing during FW initiated disconnection
[muen/linux.git] / drivers / misc / mei / client.c
index bab17e4..09f5280 100644 (file)
@@ -1766,6 +1766,10 @@ void mei_cl_complete(struct mei_cl *cl, struct mei_cl_cb *cb)
                if (waitqueue_active(&cl->wait))
                        wake_up(&cl->wait);
 
+               break;
+       case MEI_FOP_DISCONNECT_RSP:
+               mei_io_cb_free(cb);
+               mei_cl_set_disconnected(cl);
                break;
        default:
                BUG_ON(0);