aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/mouse/bcm5974.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index 6dedded27222..354c578ec9d3 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -580,23 +580,30 @@ exit:
580 */ 580 */
581static int bcm5974_start_traffic(struct bcm5974 *dev) 581static int bcm5974_start_traffic(struct bcm5974 *dev)
582{ 582{
583 if (bcm5974_wellspring_mode(dev, true)) { 583 int error;
584
585 error = bcm5974_wellspring_mode(dev, true);
586 if (error) {
584 dprintk(1, "bcm5974: mode switch failed\n"); 587 dprintk(1, "bcm5974: mode switch failed\n");
585 goto error; 588 goto err_out;
586 } 589 }
587 590
588 if (usb_submit_urb(dev->bt_urb, GFP_KERNEL)) 591 error = usb_submit_urb(dev->bt_urb, GFP_KERNEL);
589 goto error; 592 if (error)
593 goto err_reset_mode;
590 594
591 if (usb_submit_urb(dev->tp_urb, GFP_KERNEL)) 595 error = usb_submit_urb(dev->tp_urb, GFP_KERNEL);
596 if (error)
592 goto err_kill_bt; 597 goto err_kill_bt;
593 598
594 return 0; 599 return 0;
595 600
596err_kill_bt: 601err_kill_bt:
597 usb_kill_urb(dev->bt_urb); 602 usb_kill_urb(dev->bt_urb);
598error: 603err_reset_mode:
599 return -EIO; 604 bcm5974_wellspring_mode(dev, false);
605err_out:
606 return error;
600} 607}
601 608
602static void bcm5974_pause_traffic(struct bcm5974 *dev) 609static void bcm5974_pause_traffic(struct bcm5974 *dev)