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
parent
984f676b90
commit
56efef908f
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue