diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-03 21:21:59 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 20:55:45 (GMT) |
commit | 1bd09ddcffb2fb59d3211a9137d9122171724bae (patch) | |
tree | f94416bbb85af8799fc66b633eb23b10bd08a3bf /drivers/media/dvb/frontends/drxk_hard.c | |
parent | e16cede5a8945bda970b7dd80bc51c539e0e4c2d (diff) | |
download | linux-fsl-qoriq-1bd09ddcffb2fb59d3211a9137d9122171724bae.tar.xz |
[media] drxk: fix warning: ‘status’ may be used uninitialized in this function
One of the problems of the old CHECK_ERROR is that it was hiding
the status parameter. Maybe due to that, on a few places, the return
code might lead to return incorrect status:
drivers/media/dvb/frontends/drxk_hard.c: In function ‘load_microcode.clone.0’:
drivers/media/dvb/frontends/drxk_hard.c:1281: warning: ‘status’ may be used uninitialized in this function
drivers/media/dvb/frontends/drxk_hard.c:1281: note: ‘status’ was declared here
drivers/media/dvb/frontends/drxk_hard.c: In function ‘GetLockStatus’:
drivers/media/dvb/frontends/drxk_hard.c:1792: warning: ‘status’ may be used uninitialized in this function
drivers/media/dvb/frontends/drxk_hard.c: In function ‘Start.clone.7’:
drivers/media/dvb/frontends/drxk_hard.c:1734: warning: ‘status’ may be used uninitialized in this function
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/drxk_hard.c')
-rw-r--r-- | drivers/media/dvb/frontends/drxk_hard.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c index f7ae900..24f9897 100644 --- a/drivers/media/dvb/frontends/drxk_hard.c +++ b/drivers/media/dvb/frontends/drxk_hard.c @@ -1278,7 +1278,7 @@ static int DownloadMicrocode(struct drxk_state *state, u16 BlockCRC; u32 offset = 0; u32 i; - int status; + int status = 0; /* down the drain (we don care about MAGIC_WORD) */ Drain = (pSrc[0] << 8) | pSrc[1]; @@ -1731,7 +1731,7 @@ static int SetOperationMode(struct drxk_state *state, static int Start(struct drxk_state *state, s32 offsetFreq, s32 IntermediateFrequency) { - int status; + int status = 0; do { u16 IFreqkHz; @@ -1789,7 +1789,7 @@ static int ShutDown(struct drxk_state *state) static int GetLockStatus(struct drxk_state *state, u32 *pLockStatus, u32 Time) { - int status; + int status = 0; if (pLockStatus == NULL) return -1; |