diff options
author | Andrew Milkovich <amilkovich@gmail.com> | 2015-08-14 13:43:56 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-09-25 17:16:28 -0300 |
commit | a1f8c0cff03c1215e00586ff760fdeb4464091fc (patch) | |
tree | 521f9ec081683134b476f48b373614e20c5397b0 /drivers/staging | |
parent | 9ddf9071ea17b83954358b2dac42b34e5857a9af (diff) | |
download | op-kernel-dev-a1f8c0cff03c1215e00586ff760fdeb4464091fc.zip op-kernel-dev-a1f8c0cff03c1215e00586ff760fdeb4464091fc.tar.gz |
[media] Staging: media: bcm2048: warnings for uninitialized variables fixed
This patch fixes the following sparse warnings:
warning: ... may be used uninitialized in this function
Some function variables have been initialized to 0.
Signed-off-by: Andrew Milkovich <amilkovich@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/bcm2048/radio-bcm2048.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index fb55e59..b10d601 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -613,7 +613,7 @@ static int bcm2048_set_fm_frequency(struct bcm2048_device *bdev, u32 frequency) static int bcm2048_get_fm_frequency(struct bcm2048_device *bdev) { int err; - u8 lsb, msb; + u8 lsb = 0, msb = 0; mutex_lock(&bdev->mutex); @@ -658,7 +658,7 @@ static int bcm2048_set_fm_af_frequency(struct bcm2048_device *bdev, static int bcm2048_get_fm_af_frequency(struct bcm2048_device *bdev) { int err; - u8 lsb, msb; + u8 lsb = 0, msb = 0; mutex_lock(&bdev->mutex); @@ -1052,7 +1052,7 @@ static int bcm2048_set_rds_b_block_mask(struct bcm2048_device *bdev, u16 mask) static int bcm2048_get_rds_b_block_mask(struct bcm2048_device *bdev) { int err; - u8 lsb, msb; + u8 lsb = 0, msb = 0; mutex_lock(&bdev->mutex); @@ -1088,7 +1088,7 @@ static int bcm2048_set_rds_b_block_match(struct bcm2048_device *bdev, static int bcm2048_get_rds_b_block_match(struct bcm2048_device *bdev) { int err; - u8 lsb, msb; + u8 lsb = 0, msb = 0; mutex_lock(&bdev->mutex); @@ -1123,7 +1123,7 @@ static int bcm2048_set_rds_pi_mask(struct bcm2048_device *bdev, u16 mask) static int bcm2048_get_rds_pi_mask(struct bcm2048_device *bdev) { int err; - u8 lsb, msb; + u8 lsb = 0, msb = 0; mutex_lock(&bdev->mutex); @@ -1158,7 +1158,7 @@ static int bcm2048_set_rds_pi_match(struct bcm2048_device *bdev, u16 match) static int bcm2048_get_rds_pi_match(struct bcm2048_device *bdev) { int err; - u8 lsb, msb; + u8 lsb = 0, msb = 0; mutex_lock(&bdev->mutex); @@ -1193,7 +1193,7 @@ static int bcm2048_set_fm_rds_mask(struct bcm2048_device *bdev, u16 mask) static int bcm2048_get_fm_rds_mask(struct bcm2048_device *bdev) { int err; - u8 value0, value1; + u8 value0 = 0, value1 = 0; mutex_lock(&bdev->mutex); @@ -1211,7 +1211,7 @@ static int bcm2048_get_fm_rds_mask(struct bcm2048_device *bdev) static int bcm2048_get_fm_rds_flags(struct bcm2048_device *bdev) { int err; - u8 value0, value1; + u8 value0 = 0, value1 = 0; mutex_lock(&bdev->mutex); @@ -1239,7 +1239,7 @@ static int bcm2048_get_region_top_frequency(struct bcm2048_device *bdev) static int bcm2048_set_fm_best_tune_mode(struct bcm2048_device *bdev, u8 mode) { int err; - u8 value; + u8 value = 0; mutex_lock(&bdev->mutex); @@ -1913,7 +1913,7 @@ unlock: static void bcm2048_work(struct work_struct *work) { struct bcm2048_device *bdev; - u8 flag_lsb, flag_msb, flags; + u8 flag_lsb = 0, flag_msb = 0, flags; bdev = container_of(work, struct bcm2048_device, work); bcm2048_recv_command(bdev, BCM2048_I2C_FM_RDS_FLAG0, &flag_lsb); |