提交 1d001c3f 编写于 作者: M Mauro Carvalho Chehab

[media] drx-j: don't use mc_info before checking if its not NULL

smatch warning:
	drivers/media/dvb-frontends/drx39xyj/drxj.c:20803 drx_ctrl_u_code() warn: variable dereferenced before check 'mc_info' (see line 20800)
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 d1f2aae3
......@@ -20208,12 +20208,14 @@ static int drx_ctrl_u_code(struct drx_demod_instance *demod,
const u8 *mc_data_init = NULL;
u8 *mc_data = NULL;
unsigned size;
char *mc_file = mc_info->mc_file;
char *mc_file;
/* Check arguments */
if (!mc_info || !mc_file)
if (!mc_info || !mc_info->mc_file)
return -EINVAL;
mc_file = mc_info->mc_file;
if (!demod->firmware) {
const struct firmware *fw = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册