diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/mouse/bcm5974.c | 21 |
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 | */ |
581 | static int bcm5974_start_traffic(struct bcm5974 *dev) | 581 | static 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 | ||
596 | err_kill_bt: | 601 | err_kill_bt: |
597 | usb_kill_urb(dev->bt_urb); | 602 | usb_kill_urb(dev->bt_urb); |
598 | error: | 603 | err_reset_mode: |
599 | return -EIO; | 604 | bcm5974_wellspring_mode(dev, false); |
605 | err_out: | ||
606 | return error; | ||
600 | } | 607 | } |
601 | 608 | ||
602 | static void bcm5974_pause_traffic(struct bcm5974 *dev) | 609 | static void bcm5974_pause_traffic(struct bcm5974 *dev) |