diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-03-09 10:10:19 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-03-11 07:37:15 -0300 |
commit | 1d001c3fde34992bd3607ad57221655cbfc74068 (patch) | |
tree | ca18543510a89e6db34347fcb81ccef29d85c49c /drivers | |
parent | d1f2aae3d91ba107b68540aad7fbf188b734b566 (diff) | |
download | linux-1d001c3fde34992bd3607ad57221655cbfc74068.tar.bz2 |
[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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb-frontends/drx39xyj/drxj.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c index 1e6dab7e5892..a8fd53b612ae 100644 --- a/drivers/media/dvb-frontends/drx39xyj/drxj.c +++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c @@ -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; |