boards/arm/samv7: fix return values in GPIO based encoder driver

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2023-09-10 15:25:47 +03:00 committed by Xiang Xiao
parent b0a42f0146
commit 057bfd3748

View File

@ -248,7 +248,7 @@ static int sam_gpio_enc_setup(struct qe_lowerhalf_s *lower)
if (ret != OK)
{
snerr("ERROR: board_gpio_enc_irqx for ENC_A failed %d\n", ret);
return -ERROR;
return ERROR;
}
ret = board_gpio_enc_irqx(config->encb, config->encb_irq,
@ -256,7 +256,7 @@ static int sam_gpio_enc_setup(struct qe_lowerhalf_s *lower)
if (ret != OK)
{
snerr("ERROR: board_gpio_enc_irqx for ENC_B failed %d\n", ret);
return -ERROR;
return ERROR;
}
return OK;
@ -287,7 +287,7 @@ static int sam_gpio_enc_shutdown(struct qe_lowerhalf_s *lower)
{
snerr("ERROR: board_gpio_enc_irqx disable for ENC_A failed %d\n",
ret);
return -ERROR;
return ERROR;
}
ret = board_gpio_enc_irqx(config->encb, config->encb_irq,
@ -296,7 +296,7 @@ static int sam_gpio_enc_shutdown(struct qe_lowerhalf_s *lower)
{
snerr("ERROR: board_gpio_enc_irqx disable for ENC_B failed %d\n",
ret);
return -ERROR;
return ERROR;
}
return OK;
@ -372,7 +372,7 @@ int sam_gpio_enc_init(gpio_pinset_t enca_cfg, gpio_pinset_t encb_cfg,
if (ret < 0)
{
snerr("ERROR: qe_register failed: %d\n", ret);
return -ERROR;
return ERROR;
}
priv->enca = enca_cfg;