diff options
author | Aapo Tahkola <aet@rasterburn.org> | 2007-05-08 17:33:52 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:23:44 -0400 |
commit | d577ee004d1bb4620ae43758ca7a0aa35319faaa (patch) | |
tree | c9748785de60897fb2fba39f62448f3eefbad774 /drivers/media | |
parent | 3ab3b69de52460ee676304aa773cd37b0b952905 (diff) |
V4L/DVB (5696): M920x: add missing error handling to prevent syslog spamming
Signed-off-by: Aapo Tahkola <aet@rasterburn.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/dvb-usb/m920x.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c index c9f1cec341cc..a956bc503a4c 100644 --- a/drivers/media/dvb/dvb-usb/m920x.c +++ b/drivers/media/dvb/dvb-usb/m920x.c | |||
@@ -407,6 +407,7 @@ static int m920x_identify_state(struct usb_device *udev, | |||
407 | /* demod configurations */ | 407 | /* demod configurations */ |
408 | static int m920x_mt352_demod_init(struct dvb_frontend *fe) | 408 | static int m920x_mt352_demod_init(struct dvb_frontend *fe) |
409 | { | 409 | { |
410 | int ret; | ||
410 | u8 config[] = { CONFIG, 0x3d }; | 411 | u8 config[] = { CONFIG, 0x3d }; |
411 | u8 clock[] = { CLOCK_CTL, 0x30 }; | 412 | u8 clock[] = { CLOCK_CTL, 0x30 }; |
412 | u8 reset[] = { RESET, 0x80 }; | 413 | u8 reset[] = { RESET, 0x80 }; |
@@ -416,17 +417,25 @@ static int m920x_mt352_demod_init(struct dvb_frontend *fe) | |||
416 | u8 unk1[] = { 0x93, 0x1a }; | 417 | u8 unk1[] = { 0x93, 0x1a }; |
417 | u8 unk2[] = { 0xb5, 0x7a }; | 418 | u8 unk2[] = { 0xb5, 0x7a }; |
418 | 419 | ||
419 | mt352_write(fe, config, ARRAY_SIZE(config)); | ||
420 | mt352_write(fe, clock, ARRAY_SIZE(clock)); | ||
421 | mt352_write(fe, reset, ARRAY_SIZE(reset)); | ||
422 | mt352_write(fe, adc_ctl, ARRAY_SIZE(adc_ctl)); | ||
423 | mt352_write(fe, agc, ARRAY_SIZE(agc)); | ||
424 | mt352_write(fe, sec_agc, ARRAY_SIZE(sec_agc)); | ||
425 | mt352_write(fe, unk1, ARRAY_SIZE(unk1)); | ||
426 | mt352_write(fe, unk2, ARRAY_SIZE(unk2)); | ||
427 | |||
428 | deb("Demod init!\n"); | 420 | deb("Demod init!\n"); |
429 | 421 | ||
422 | if ((ret = mt352_write(fe, config, ARRAY_SIZE(config))) != 0) | ||
423 | return ret; | ||
424 | if ((ret = mt352_write(fe, clock, ARRAY_SIZE(clock))) != 0) | ||
425 | return ret; | ||
426 | if ((ret = mt352_write(fe, reset, ARRAY_SIZE(reset))) != 0) | ||
427 | return ret; | ||
428 | if ((ret = mt352_write(fe, adc_ctl, ARRAY_SIZE(adc_ctl))) != 0) | ||
429 | return ret; | ||
430 | if ((ret = mt352_write(fe, agc, ARRAY_SIZE(agc))) != 0) | ||
431 | return ret; | ||
432 | if ((ret = mt352_write(fe, sec_agc, ARRAY_SIZE(sec_agc))) != 0) | ||
433 | return ret; | ||
434 | if ((ret = mt352_write(fe, unk1, ARRAY_SIZE(unk1))) != 0) | ||
435 | return ret; | ||
436 | if ((ret = mt352_write(fe, unk2, ARRAY_SIZE(unk2))) != 0) | ||
437 | return ret; | ||
438 | |||
430 | return 0; | 439 | return 0; |
431 | } | 440 | } |
432 | 441 | ||