diff --git a/arch/arm/src/stm32/stm32_i2c_v2.c b/arch/arm/src/stm32/stm32_i2c_v2.c index e17b537849..22073d9f6f 100644 --- a/arch/arm/src/stm32/stm32_i2c_v2.c +++ b/arch/arm/src/stm32/stm32_i2c_v2.c @@ -2804,7 +2804,6 @@ int stm32_i2cbus_uninitialize(struct i2c_master_s *dev) if (--priv->refs) { nxmutex_unlock(&priv->lock); - kmm_free(dev); return OK; } diff --git a/arch/arm/src/stm32f0l0g0/stm32_i2c.c b/arch/arm/src/stm32f0l0g0/stm32_i2c.c index 4f34ed1c99..362cf0de5d 100644 --- a/arch/arm/src/stm32f0l0g0/stm32_i2c.c +++ b/arch/arm/src/stm32f0l0g0/stm32_i2c.c @@ -2803,7 +2803,6 @@ int stm32_i2cbus_uninitialize(struct i2c_master_s *dev) if (--priv->refs) { nxmutex_unlock(&priv->lock); - kmm_free(dev); return OK; } diff --git a/arch/arm/src/stm32f7/stm32_i2c.c b/arch/arm/src/stm32f7/stm32_i2c.c index 6a629f6da8..cce760ec80 100644 --- a/arch/arm/src/stm32f7/stm32_i2c.c +++ b/arch/arm/src/stm32f7/stm32_i2c.c @@ -2842,7 +2842,6 @@ int stm32_i2cbus_uninitialize(struct i2c_master_s *dev) if (--priv->refs) { nxmutex_unlock(&priv->lock); - kmm_free(dev); return OK; } diff --git a/arch/arm/src/stm32h7/stm32_i2c.c b/arch/arm/src/stm32h7/stm32_i2c.c index 87736a2a4a..5d2edf9148 100644 --- a/arch/arm/src/stm32h7/stm32_i2c.c +++ b/arch/arm/src/stm32h7/stm32_i2c.c @@ -2805,7 +2805,6 @@ int stm32_i2cbus_uninitialize(struct i2c_master_s *dev) if (--priv->refs) { nxmutex_unlock(&priv->lock); - kmm_free(dev); return OK; } diff --git a/arch/arm/src/stm32l4/stm32l4_1wire.c b/arch/arm/src/stm32l4/stm32l4_1wire.c index 593eb86478..0078ee3e6b 100644 --- a/arch/arm/src/stm32l4/stm32l4_1wire.c +++ b/arch/arm/src/stm32l4/stm32l4_1wire.c @@ -1247,7 +1247,6 @@ int stm32l4_1wireuninitialize(struct onewire_dev_s *dev) if (--priv->refs) { nxmutex_unlock(&priv->lock); - kmm_free(priv); return OK; } diff --git a/arch/arm/src/stm32l4/stm32l4_i2c.c b/arch/arm/src/stm32l4/stm32l4_i2c.c index 7a2ed68dc0..216fe28da1 100644 --- a/arch/arm/src/stm32l4/stm32l4_i2c.c +++ b/arch/arm/src/stm32l4/stm32l4_i2c.c @@ -3007,7 +3007,6 @@ int stm32l4_i2cbus_uninitialize(struct i2c_master_s *dev) if (--priv->refs) { nxmutex_unlock(&priv->lock); - kmm_free(dev); return OK; }