diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-05-23 16:58:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-23 23:14:14 -0400 |
commit | ae2d990eede0ef5938c210d48a177c044258ecd8 (patch) | |
tree | 7b4647fee2ef54f65583b1daaf406a88935b58ff /drivers/isdn/hisax/st5481_init.c | |
parent | 9d9a2000e683ecd497b65d5f3e73b048c68976e1 (diff) |
HiSax: fix error checking for hisax_register()]
This patch (as875) adds error-checking to the callers of hisax_register().
It also changes an error pathway in that routine, making it return an error
code rather than 0.
This fixes Bugzilla #7960.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Martin Bachem <info@colognechip.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/isdn/hisax/st5481_init.c')
-rw-r--r-- | drivers/isdn/hisax/st5481_init.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c index bb3a28a53ff4..13751237bfcd 100644 --- a/drivers/isdn/hisax/st5481_init.c +++ b/drivers/isdn/hisax/st5481_init.c | |||
@@ -107,12 +107,17 @@ static int probe_st5481(struct usb_interface *intf, | |||
107 | for (i = 0; i < 2; i++) | 107 | for (i = 0; i < 2; i++) |
108 | b_if[i] = &adapter->bcs[i].b_if; | 108 | b_if[i] = &adapter->bcs[i].b_if; |
109 | 109 | ||
110 | hisax_register(&adapter->hisax_d_if, b_if, "st5481_usb", protocol); | 110 | if (hisax_register(&adapter->hisax_d_if, b_if, "st5481_usb", |
111 | protocol) != 0) | ||
112 | goto err_b1; | ||
113 | |||
111 | st5481_start(adapter); | 114 | st5481_start(adapter); |
112 | 115 | ||
113 | usb_set_intfdata(intf, adapter); | 116 | usb_set_intfdata(intf, adapter); |
114 | return 0; | 117 | return 0; |
115 | 118 | ||
119 | err_b1: | ||
120 | st5481_release_b(&adapter->bcs[1]); | ||
116 | err_b: | 121 | err_b: |
117 | st5481_release_b(&adapter->bcs[0]); | 122 | st5481_release_b(&adapter->bcs[0]); |
118 | err_d: | 123 | err_d: |