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

ASoC: codecs: aw88395: Fix some error codes

These error paths should return -EINVAL instead of success.

Fixes: 7f4ec778 ("ASoC: codecs: Add code for bin parsing compatible with aw88261")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/81476e78-05c2-4656-b754-f314c7ccdb81@moroto.mountainSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ec83a0b3
......@@ -452,11 +452,13 @@ static int aw_dev_parse_reg_bin_with_hdr(struct aw_device *aw_dev,
if ((aw_bin->all_bin_parse_num != 1) ||
(aw_bin->header_info[0].bin_data_type != DATA_TYPE_REGISTER)) {
dev_err(aw_dev->dev, "bin num or type error");
ret = -EINVAL;
goto parse_bin_failed;
}
if (aw_bin->header_info[0].valid_data_len % 4) {
dev_err(aw_dev->dev, "bin data len get error!");
ret = -EINVAL;
goto parse_bin_failed;
}
......
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