mirror of
https://github.com/apache/nuttx.git
synced 2026-06-03 22:20:31 +08:00
Various drivers: Cloned logic. On error, memory was freed, but the error was not returned. It just continued as though no error happened.
This commit is contained in:
committed by
Gregory Nutt
parent
7bd045130c
commit
e805bc0660
@@ -409,6 +409,7 @@ int i2c_register(FAR struct i2c_master_s *i2c, int bus)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
kmm_free(priv);
|
kmm_free(priv);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the result of the registration */
|
/* Return the result of the registration */
|
||||||
|
|||||||
@@ -439,6 +439,7 @@ int i2schar_register(FAR struct i2s_dev_s *i2s, int minor)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
kmm_free(priv);
|
kmm_free(priv);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the result of the registration */
|
/* Return the result of the registration */
|
||||||
|
|||||||
@@ -398,6 +398,7 @@ int spi_register(FAR struct spi_dev_s *spi, int bus)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
kmm_free(priv);
|
kmm_free(priv);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the result of the registration */
|
/* Return the result of the registration */
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ struct adc_fifo_s
|
|||||||
|
|
||||||
/* This structure defines all of the operations providd by the architecture specific
|
/* This structure defines all of the operations providd by the architecture specific
|
||||||
* logic. All fields must be provided with non-NULL function pointers by the
|
* logic. All fields must be provided with non-NULL function pointers by the
|
||||||
* caller of can_register().
|
* caller of adc_register().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct adc_dev_s;
|
struct adc_dev_s;
|
||||||
|
|||||||
Reference in New Issue
Block a user