Merge "diag: Fix race condition while closing SMD"
This commit is contained in:
commit
f2fedb98bd
1 changed files with 1 additions and 2 deletions
|
@ -651,13 +651,12 @@ void diagfwd_close_transport(uint8_t transport, uint8_t peripheral)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mutex_lock(&driver->diagfwd_channel_mutex);
|
||||||
fwd_info = &early_init_info[transport][peripheral];
|
fwd_info = &early_init_info[transport][peripheral];
|
||||||
if (fwd_info->p_ops && fwd_info->p_ops->close)
|
if (fwd_info->p_ops && fwd_info->p_ops->close)
|
||||||
fwd_info->p_ops->close(fwd_info->ctxt);
|
fwd_info->p_ops->close(fwd_info->ctxt);
|
||||||
mutex_lock(&driver->diagfwd_channel_mutex);
|
|
||||||
fwd_info = &early_init_info[transport_open][peripheral];
|
fwd_info = &early_init_info[transport_open][peripheral];
|
||||||
dest_info = &peripheral_info[TYPE_CNTL][peripheral];
|
dest_info = &peripheral_info[TYPE_CNTL][peripheral];
|
||||||
dest_info->inited = 1;
|
dest_info->inited = 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue