diff mbox

[14/18] cx25840: Fix subdev registration in cx25840-core.c

Message ID 4d1ef590.cc7e0e0a.7c81.08b4@mx.google.com (mailing list archive)
State Superseded
Headers show

Commit Message

Igor M. Liplianin Dec. 31, 2010, 11:37 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c
index dfb198d..dc0cec7 100644
--- a/drivers/media/video/cx25840/cx25840-core.c
+++ b/drivers/media/video/cx25840/cx25840-core.c
@@ -1991,6 +1991,8 @@  static int cx25840_probe(struct i2c_client *client,
 	if (!is_cx2583x(state)) {
 		default_volume = 228 - cx25840_read(client, 0x8d4);
 		default_volume = ((default_volume / 2) + 23) << 9;
+		if (default_volume > 65535)
+			default_volume = 65535;
 
 		state->volume = v4l2_ctrl_new_std(&state->hdl,
 			&cx25840_audio_ctrl_ops, V4L2_CID_AUDIO_VOLUME,