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:
Petro Karashchenko 2019-11-03 19:31:49 -06:00 committed by Gregory Nutt
parent 7bd045130c
commit e805bc0660
4 changed files with 4 additions and 1 deletions

View File

@ -409,6 +409,7 @@ int i2c_register(FAR struct i2c_master_s *i2c, int bus)
*/
kmm_free(priv);
return ret;
}
/* Return the result of the registration */

View File

@ -439,6 +439,7 @@ int i2schar_register(FAR struct i2s_dev_s *i2s, int minor)
*/
kmm_free(priv);
return ret;
}
/* Return the result of the registration */

View File

@ -398,6 +398,7 @@ int spi_register(FAR struct spi_dev_s *spi, int bus)
*/
kmm_free(priv);
return ret;
}
/* Return the result of the registration */

View File

@ -128,7 +128,7 @@ struct adc_fifo_s
/* 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
* caller of can_register().
* caller of adc_register().
*/
struct adc_dev_s;