arch/stm32/1wire: Don't free the context if the reference doesn't equal zero
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
0740ebb21b
commit
93fe5a3d0d
@ -1273,7 +1273,6 @@ int stm32_1wireuninitialize(struct onewire_dev_s *dev)
|
||||
if (--priv->refs)
|
||||
{
|
||||
nxmutex_unlock(&priv->lock);
|
||||
kmm_free(priv);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user