From 9461a8a2a8d5f1f032a395e5c0b22dd3db2f7ef9 Mon Sep 17 00:00:00 2001 From: Marina Makienko Date: Mon, 25 Feb 2013 22:26:50 +0000 Subject: [PATCH] --- yaml --- r: 360773 b: refs/heads/master c: 114a6f8b52163c0232fbcd7f3808ff04dc61a9b5 h: refs/heads/master i: 360771: 11e0ddd5499a9c0e0f26fd1698c1c8c5625bd106 v: v3 --- [refs] | 2 +- trunk/drivers/isdn/hisax/st5481_usb.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 4fc041bd8f00..b6e1add0c917 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6c8c4e4c24b9f6cee3d356a51e4a7f2af787a49b +refs/heads/master: 114a6f8b52163c0232fbcd7f3808ff04dc61a9b5 diff --git a/trunk/drivers/isdn/hisax/st5481_usb.c b/trunk/drivers/isdn/hisax/st5481_usb.c index 017c67ea3f4c..ead0a4fb7448 100644 --- a/trunk/drivers/isdn/hisax/st5481_usb.c +++ b/trunk/drivers/isdn/hisax/st5481_usb.c @@ -294,13 +294,13 @@ int st5481_setup_usb(struct st5481_adapter *adapter) // Allocate URBs and buffers for interrupt endpoint urb = usb_alloc_urb(0, GFP_KERNEL); if (!urb) { - return -ENOMEM; + goto err1; } intr->urb = urb; buf = kmalloc(INT_PKT_SIZE, GFP_KERNEL); if (!buf) { - return -ENOMEM; + goto err2; } endpoint = &altsetting->endpoint[EP_INT-1]; @@ -313,6 +313,14 @@ int st5481_setup_usb(struct st5481_adapter *adapter) endpoint->desc.bInterval); return 0; +err2: + usb_free_urb(intr->urb); + intr->urb = NULL; +err1: + usb_free_urb(ctrl->urb); + ctrl->urb = NULL; + + return -ENOMEM; } /*