diff options
Diffstat (limited to 'drivers/isdn/gigaset/usb-gigaset.c')
-rw-r--r-- | drivers/isdn/gigaset/usb-gigaset.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index 049da67f6392..bb12d8051732 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c | |||
@@ -549,10 +549,9 @@ static int gigaset_brkchars(struct cardstate *cs, const unsigned char buf[6]) | |||
549 | 0, 0, &buf, 6, 2000); | 549 | 0, 0, &buf, 6, 2000); |
550 | } | 550 | } |
551 | 551 | ||
552 | static int gigaset_freebcshw(struct bc_state *bcs) | 552 | static void gigaset_freebcshw(struct bc_state *bcs) |
553 | { | 553 | { |
554 | /* unused */ | 554 | /* unused */ |
555 | return 1; | ||
556 | } | 555 | } |
557 | 556 | ||
558 | /* Initialize the b-channel structure */ | 557 | /* Initialize the b-channel structure */ |
@@ -560,7 +559,7 @@ static int gigaset_initbcshw(struct bc_state *bcs) | |||
560 | { | 559 | { |
561 | /* unused */ | 560 | /* unused */ |
562 | bcs->hw.usb = NULL; | 561 | bcs->hw.usb = NULL; |
563 | return 1; | 562 | return 0; |
564 | } | 563 | } |
565 | 564 | ||
566 | static void gigaset_reinitbcshw(struct bc_state *bcs) | 565 | static void gigaset_reinitbcshw(struct bc_state *bcs) |
@@ -582,7 +581,7 @@ static int gigaset_initcshw(struct cardstate *cs) | |||
582 | kmalloc(sizeof(struct usb_cardstate), GFP_KERNEL); | 581 | kmalloc(sizeof(struct usb_cardstate), GFP_KERNEL); |
583 | if (!ucs) { | 582 | if (!ucs) { |
584 | pr_err("out of memory\n"); | 583 | pr_err("out of memory\n"); |
585 | return 0; | 584 | return -ENOMEM; |
586 | } | 585 | } |
587 | 586 | ||
588 | ucs->bchars[0] = 0; | 587 | ucs->bchars[0] = 0; |
@@ -597,7 +596,7 @@ static int gigaset_initcshw(struct cardstate *cs) | |||
597 | tasklet_init(&cs->write_tasklet, | 596 | tasklet_init(&cs->write_tasklet, |
598 | gigaset_modem_fill, (unsigned long) cs); | 597 | gigaset_modem_fill, (unsigned long) cs); |
599 | 598 | ||
600 | return 1; | 599 | return 0; |
601 | } | 600 | } |
602 | 601 | ||
603 | /* Send data from current skb to the device. */ | 602 | /* Send data from current skb to the device. */ |
@@ -766,9 +765,9 @@ static int gigaset_probe(struct usb_interface *interface, | |||
766 | if (startmode == SM_LOCKED) | 765 | if (startmode == SM_LOCKED) |
767 | cs->mstate = MS_LOCKED; | 766 | cs->mstate = MS_LOCKED; |
768 | 767 | ||
769 | if (!gigaset_start(cs)) { | 768 | retval = gigaset_start(cs); |
769 | if (retval < 0) { | ||
770 | tasklet_kill(&cs->write_tasklet); | 770 | tasklet_kill(&cs->write_tasklet); |
771 | retval = -ENODEV; | ||
772 | goto error; | 771 | goto error; |
773 | } | 772 | } |
774 | return 0; | 773 | return 0; |
@@ -898,8 +897,10 @@ static int __init usb_gigaset_init(void) | |||
898 | driver = gigaset_initdriver(GIGASET_MINOR, GIGASET_MINORS, | 897 | driver = gigaset_initdriver(GIGASET_MINOR, GIGASET_MINORS, |
899 | GIGASET_MODULENAME, GIGASET_DEVNAME, | 898 | GIGASET_MODULENAME, GIGASET_DEVNAME, |
900 | &ops, THIS_MODULE); | 899 | &ops, THIS_MODULE); |
901 | if (driver == NULL) | 900 | if (driver == NULL) { |
901 | result = -ENOMEM; | ||
902 | goto error; | 902 | goto error; |
903 | } | ||
903 | 904 | ||
904 | /* register this driver with the USB subsystem */ | 905 | /* register this driver with the USB subsystem */ |
905 | result = usb_register(&gigaset_usb_driver); | 906 | result = usb_register(&gigaset_usb_driver); |
@@ -915,7 +916,7 @@ error: | |||
915 | if (driver) | 916 | if (driver) |
916 | gigaset_freedriver(driver); | 917 | gigaset_freedriver(driver); |
917 | driver = NULL; | 918 | driver = NULL; |
918 | return -1; | 919 | return result; |
919 | } | 920 | } |
920 | 921 | ||
921 | /* | 922 | /* |