dm: mei: check for state before link reset callback
Prevent intercepting reset callback if reset state
transition is already in progress.
Acked-by: Acked-by: Yu Wang
@@ -1984,6 +1984,9 @@ vmei_reset_callback(int fd, enum ev_type type, void *param)
char buf[MEI_DEV_STATE_LEN] = {0};
int sz;
+ if (vmei->status != VMEI_STS_READY)
+ return;
+
lseek(fd, 0, SEEK_SET);
sz = read(fd, buf, 12);
if (first_time) {
