aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c')
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c b/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c
index 2a34ceee4802..3052c4c20229 100644
--- a/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c
+++ b/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c
@@ -654,8 +654,9 @@ static struct pcb_config cx231xx_Scenario[] = {
654 654
655/*****************************************************************/ 655/*****************************************************************/
656 656
657u32 initialize_cx231xx(struct cx231xx *dev) 657int initialize_cx231xx(struct cx231xx *dev)
658{ 658{
659 int retval;
659 u32 config_info = 0; 660 u32 config_info = 0;
660 struct pcb_config *p_pcb_info; 661 struct pcb_config *p_pcb_info;
661 u8 usb_speed = 1; /* from register,1--HS, 0--FS */ 662 u8 usb_speed = 1; /* from register,1--HS, 0--FS */
@@ -670,7 +671,10 @@ u32 initialize_cx231xx(struct cx231xx *dev)
670 671
671 /* read board config register to find out which 672 /* read board config register to find out which
672 pcb config it is related to */ 673 pcb config it is related to */
673 cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, BOARD_CFG_STAT, data, 4); 674 retval = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, BOARD_CFG_STAT,
675 data, 4);
676 if (retval < 0)
677 return retval;
674 678
675 config_info = le32_to_cpu(*((__le32 *)data)); 679 config_info = le32_to_cpu(*((__le32 *)data));
676 usb_speed = (u8) (config_info & 0x1); 680 usb_speed = (u8) (config_info & 0x1);
@@ -767,7 +771,7 @@ u32 initialize_cx231xx(struct cx231xx *dev)
767 cx231xx_info("bad senario!!!!!\n"); 771 cx231xx_info("bad senario!!!!!\n");
768 cx231xx_info("config_info=%x\n", 772 cx231xx_info("config_info=%x\n",
769 (config_info & SELFPOWER_MASK)); 773 (config_info & SELFPOWER_MASK));
770 return 1; 774 return -ENODEV;
771 } 775 }
772 } 776 }
773 777