aboutsummaryrefslogtreecommitdiff
path: root/drivers/sound/max98357a.c
diff options
context:
space:
mode:
authorSimon Glass2020-11-04 09:57:29 -0700
committerBin Meng2020-11-06 09:51:29 +0800
commitdd30c5bb574aba55e99284dbdfe0d6033bf44d7f (patch)
tree9e3a21ede0f6748d5a18dd7238f315e016a7013b /drivers/sound/max98357a.c
parenta0ed800376b0db57428f9bf6401db36789ff1aa6 (diff)
x86: sound: Correct error handling
A few functions have changed to return pin numbers or I2C addresses. The error checking for some of the callers is therefore wrong. Fix them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/sound/max98357a.c')
-rw-r--r--drivers/sound/max98357a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/sound/max98357a.c b/drivers/sound/max98357a.c
index 827262d235c..b3d27a3616e 100644
--- a/drivers/sound/max98357a.c
+++ b/drivers/sound/max98357a.c
@@ -69,7 +69,7 @@ static int max98357a_acpi_fill_ssdt(const struct udevice *dev,
acpigen_write_name(ctx, "_CRS");
acpigen_write_resourcetemplate_header(ctx);
ret = acpi_device_write_gpio_desc(ctx, &priv->sdmode_gpio);
- if (ret)
+ if (ret < 0)
return log_msg_ret("gpio", ret);
acpigen_write_resourcetemplate_footer(ctx);