aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-07-03 17:21:59 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 16:55:45 -0400
commit1bd09ddcffb2fb59d3211a9137d9122171724bae (patch)
treef94416bbb85af8799fc66b633eb23b10bd08a3bf /drivers
parente16cede5a8945bda970b7dd80bc51c539e0e4c2d (diff)
[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')
-rw-r--r--drivers/media/dvb/frontends/drxk_hard.c6
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 f7ae90081114..24f9897077a0 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,
1278 u16 BlockCRC; 1278 u16 BlockCRC;
1279 u32 offset = 0; 1279 u32 offset = 0;
1280 u32 i; 1280 u32 i;
1281 int status; 1281 int status = 0;
1282 1282
1283 /* down the drain (we don care about MAGIC_WORD) */ 1283 /* down the drain (we don care about MAGIC_WORD) */
1284 Drain = (pSrc[0] << 8) | pSrc[1]; 1284 Drain = (pSrc[0] << 8) | pSrc[1];
@@ -1731,7 +1731,7 @@ static int SetOperationMode(struct drxk_state *state,
1731static int Start(struct drxk_state *state, s32 offsetFreq, 1731static int Start(struct drxk_state *state, s32 offsetFreq,
1732 s32 IntermediateFrequency) 1732 s32 IntermediateFrequency)
1733{ 1733{
1734 int status; 1734 int status = 0;
1735 1735
1736 do { 1736 do {
1737 u16 IFreqkHz; 1737 u16 IFreqkHz;
@@ -1789,7 +1789,7 @@ static int ShutDown(struct drxk_state *state)
1789static int GetLockStatus(struct drxk_state *state, u32 *pLockStatus, 1789static int GetLockStatus(struct drxk_state *state, u32 *pLockStatus,
1790 u32 Time) 1790 u32 Time)
1791{ 1791{
1792 int status; 1792 int status = 0;
1793 1793
1794 if (pLockStatus == NULL) 1794 if (pLockStatus == NULL)
1795 return -1; 1795 return -1;