The compiler warned about an uninitialized stereo variable. By simplifying
the code it 1) improved readability and 2) fixed the compiler warning.
Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
u16 stereo, rds;
u32 p;
- if (!sdev) {
- rval = -ENODEV;
- goto exit;
- }
+ if (!sdev)
+ return -ENODEV;
- if (vm->index > 0) {
- rval = -EINVAL;
- goto exit;
- }
+ if (vm->index > 0)
+ return -EINVAL;
/* Set audio mode: mono or stereo */
if (vm->txsubchans & V4L2_TUNER_SUB_STEREO)
else if (vm->txsubchans & V4L2_TUNER_SUB_MONO)
stereo = 0;
else
- rval = -EINVAL;
- if (rval < 0)
- goto exit;
+ return -EINVAL;
rds = !!(vm->txsubchans & V4L2_TUNER_SUB_RDS);
unlock:
mutex_unlock(&sdev->mutex);
-exit:
return rval;
}