aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/ohci.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-11-30 02:24:01 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2010-12-13 14:39:13 -0500
commitc088ab30ebf184afae01d919c77cebcfdce39df3 (patch)
tree7a66936c37b0c938db2eb398bdb763a648281393 /drivers/firewire/ohci.c
parent7a39d8b82165462729d09066bddb395a19025acd (diff)
firewire: ohci: fix AT context initialization error handling
Add proper error handling for the context_init() calls. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/ohci.c')
-rw-r--r--drivers/firewire/ohci.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index be0a01d8cef3..3775364f1b51 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -3102,11 +3102,15 @@ static int __devinit pci_probe(struct pci_dev *dev,
3102 if (err < 0) 3102 if (err < 0)
3103 goto fail_arreq_ctx; 3103 goto fail_arreq_ctx;
3104 3104
3105 context_init(&ohci->at_request_ctx, ohci, 3105 err = context_init(&ohci->at_request_ctx, ohci,
3106 OHCI1394_AsReqTrContextControlSet, handle_at_packet); 3106 OHCI1394_AsReqTrContextControlSet, handle_at_packet);
3107 if (err < 0)
3108 goto fail_arrsp_ctx;
3107 3109
3108 context_init(&ohci->at_response_ctx, ohci, 3110 err = context_init(&ohci->at_response_ctx, ohci,
3109 OHCI1394_AsRspTrContextControlSet, handle_at_packet); 3111 OHCI1394_AsRspTrContextControlSet, handle_at_packet);
3112 if (err < 0)
3113 goto fail_atreq_ctx;
3110 3114
3111 reg_write(ohci, OHCI1394_IsoRecvIntMaskSet, ~0); 3115 reg_write(ohci, OHCI1394_IsoRecvIntMaskSet, ~0);
3112 ohci->ir_context_channels = ~0ULL; 3116 ohci->ir_context_channels = ~0ULL;
@@ -3163,7 +3167,9 @@ static int __devinit pci_probe(struct pci_dev *dev,
3163 kfree(ohci->ir_context_list); 3167 kfree(ohci->ir_context_list);
3164 kfree(ohci->it_context_list); 3168 kfree(ohci->it_context_list);
3165 context_release(&ohci->at_response_ctx); 3169 context_release(&ohci->at_response_ctx);
3170 fail_atreq_ctx:
3166 context_release(&ohci->at_request_ctx); 3171 context_release(&ohci->at_request_ctx);
3172 fail_arrsp_ctx:
3167 ar_context_release(&ohci->ar_response_ctx); 3173 ar_context_release(&ohci->ar_response_ctx);
3168 fail_arreq_ctx: 3174 fail_arreq_ctx:
3169 ar_context_release(&ohci->ar_request_ctx); 3175 ar_context_release(&ohci->ar_request_ctx);