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:
Xiang Xiao 2022-10-30 21:23:09 +08:00 committed by Alan Carvalho de Assis
parent 0740ebb21b
commit 93fe5a3d0d

View File

@ -1273,7 +1273,6 @@ int stm32_1wireuninitialize(struct onewire_dev_s *dev)
if (--priv->refs)
{
nxmutex_unlock(&priv->lock);
kmm_free(priv);
return OK;
}