Commit ed959833 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

ASoC: tas2781: Fix error code in tas2781_load_calibration()

Return -EINVAL instead of success on this error path.

Fixes: 915f5ead ("ASoC: tas2781: firmware lib")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/Message-Id: <729bb6b3-bc1d-4b3d-8b65-077a492c753c@moroto.mountain>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 15475631
......@@ -1924,6 +1924,7 @@ int tas2781_load_calibration(void *context, char *file_name,
if (!fw_entry->size) {
dev_err(tas_priv->dev, "%s: file read error: size = %lu\n",
__func__, (unsigned long)fw_entry->size);
ret = -EINVAL;
goto out;
}
fmw.size = fw_entry->size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment