Commit a1f8c0cf authored by Andrew Milkovich's avatar Andrew Milkovich Committed by Mauro Carvalho Chehab

[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: default avatarAndrew Milkovich <amilkovich@gmail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 9ddf9071
......@@ -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 @@ static int bcm2048_probe(struct bcm2048_device *bdev)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment