aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tda9840.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tda9840.c')
-rw-r--r--drivers/media/video/tda9840.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/video/tda9840.c b/drivers/media/video/tda9840.c
index 8de20ad14e9b2..b5177c6f54f6a 100644
--- a/drivers/media/video/tda9840.c
+++ b/drivers/media/video/tda9840.c
@@ -117,7 +117,8 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg)
dprintk("i2c_smbus_write_byte() failed, ret:%d\n", result);
break;
- case TDA9840_DETECT:
+ case TDA9840_DETECT: {
+ int *ret = (int *)arg;
byte = i2c_smbus_read_byte_data(client, STEREO_ADJUST);
if (byte == -1) {
@@ -131,8 +132,10 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg)
}
dprintk("TDA9840_DETECT: byte: 0x%02x\n", byte);
- return ((byte & 0x60) >> 5);
-
+ *ret = ((byte & 0x60) >> 5);
+ result = 0;
+ break;
+ }
case TDA9840_TEST:
dprintk("TDA9840_TEST: 0x%02x\n", byte);