]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] radio-bcm2048: don't ignore errors
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 12 Oct 2016 11:21:43 +0000 (08:21 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 17 Oct 2016 14:12:57 +0000 (12:12 -0200)
Remove this warning:

drivers/staging/media/bcm2048/radio-bcm2048.c: In function 'bcm2048_set_rds_no_lock':
drivers/staging/media/bcm2048/radio-bcm2048.c:467:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]
  int err;
      ^~~

By returning the error code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/bcm2048/radio-bcm2048.c

index ea15cc6380970e159addcf91ce18c431b1cb1ef0..4d9bd02ede4700c8a89460ed68b0ce66898d3c26 100644 (file)
@@ -482,6 +482,8 @@ static int bcm2048_set_rds_no_lock(struct bcm2048_device *bdev, u8 rds_on)
                                           flags);
                memset(&bdev->rds_info, 0, sizeof(bdev->rds_info));
        }
+       if (err)
+               return err;
 
        return bcm2048_send_command(bdev, BCM2048_I2C_FM_RDS_SYSTEM,
                                    bdev->cache_fm_rds_system);