summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/st5481_init.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-05-23 13:58:12 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-23 20:14:14 -0700
commitae2d990eede0ef5938c210d48a177c044258ecd8 (patch)
tree7b4647fee2ef54f65583b1daaf406a88935b58ff /drivers/isdn/hisax/st5481_init.c
parent9d9a2000e683ecd497b65d5f3e73b048c68976e1 (diff)
downloadtalos-op-linux-ae2d990eede0ef5938c210d48a177c044258ecd8.tar.gz
talos-op-linux-ae2d990eede0ef5938c210d48a177c044258ecd8.zip
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.c7
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,
for (i = 0; i < 2; i++)
b_if[i] = &adapter->bcs[i].b_if;
- hisax_register(&adapter->hisax_d_if, b_if, "st5481_usb", protocol);
+ if (hisax_register(&adapter->hisax_d_if, b_if, "st5481_usb",
+ protocol) != 0)
+ goto err_b1;
+
st5481_start(adapter);
usb_set_intfdata(intf, adapter);
return 0;
+ err_b1:
+ st5481_release_b(&adapter->bcs[1]);
err_b:
st5481_release_b(&adapter->bcs[0]);
err_d:
OpenPOWER on IntegriCloud