1
0
Fork 0

MLK-20189-4: ASoC: fsl: library_load: Check return value for kernel_read

Bail out if kernel_read returns an error.

Fixes: CID1477415

Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
pull/10/head
Daniel Baluta 2018-11-08 16:02:40 +02:00
parent 984f676b90
commit 56efef908f
1 changed files with 3 additions and 1 deletions

View File

@ -484,7 +484,9 @@ load_dpu_with_library(struct xf_client *client, struct xf_proxy *proxy,
return -ENOMEM;
vfs_llseek(file, 0, SEEK_SET);
kernel_read(file, srambuf, filesize, &pos);
ret_val = kernel_read(file, srambuf, filesize, &pos);
if (ret_val < 0)
return ret_val;
filp_close(file, NULL);
ret_val = xtlib_split_pi_library_size(