1
0
Fork 0

LF-2011 gpu: imx: imx8_dprc: Check return value of SCU func call in dprc_dpu_gpr_configure()

This patch checks the return value of imx_sc_misc_set_control() called
in dprc_dpu_gpr_configure() and generates warning dmesg in case the
return value is nonzero.  The check makes Coverity happy.

This fixes Coverity issue: CID 10836598.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Liu Ying 2020-08-11 10:22:17 +08:00
parent 23f2599c0c
commit 1b5dff0335
1 changed files with 5 additions and 1 deletions

View File

@ -298,8 +298,12 @@ EXPORT_SYMBOL_GPL(dprc_disable);
static inline void
dprc_dpu_gpr_configure(struct dprc *dprc, unsigned int stream_id)
{
imx_sc_misc_set_control(dprc->ipc_handle,
int ret;
ret = imx_sc_misc_set_control(dprc->ipc_handle,
dprc->sc_resource, IMX_SC_C_KACHUNK_SEL, stream_id);
if (ret)
dev_warn(dprc->dev, "failed to set KACHUNK_SEL: %d\n", ret);
}
static inline void