Fix build errors when using DEBUGASSERT

I never tested these drivers with debug assertions enabled as I should
have. This commit fixes build errors due to wrong variable names used.
This commit is contained in:
Augusto Fraga Giachero 2020-09-17 15:54:37 -03:00 committed by Xiang Xiao
parent 1473c6848f
commit 1efbb4c114
2 changed files with 3 additions and 3 deletions

View File

@ -199,7 +199,7 @@ static int dac7554_send(FAR struct dac_dev_s *dev, FAR struct dac_msg_s *msg)
/* Sanity check */
DEBUGASSERT(priv->SPI != NULL);
DEBUGASSERT(priv->spi != NULL);
/* Set up message to send */
@ -261,7 +261,7 @@ FAR struct dac_dev_s *dac7554_initialize(FAR struct spi_dev_s *spi,
/* Sanity check */
DEBUGASSERT(i2c != NULL);
DEBUGASSERT(spi != NULL);
/* Initialize the DAC7554 device structure */

View File

@ -230,7 +230,7 @@ static int dat31r5sp_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
{
FAR struct attenuator_control *att =
(FAR struct attenuator_control *)((uintptr_t)arg);
DEBUGASSERT(ptr != NULL);
DEBUGASSERT(att != NULL);
dat31r5sp_set_attenuation(priv, att->attenuation);
}
break;