Commit c088ab30 authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Stefan Richter

firewire: ohci: fix AT context initialization error handling

Add proper error handling for the context_init() calls.
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 7a39d8b8
...@@ -3102,11 +3102,15 @@ static int __devinit pci_probe(struct pci_dev *dev, ...@@ -3102,11 +3102,15 @@ static int __devinit pci_probe(struct pci_dev *dev,
if (err < 0) if (err < 0)
goto fail_arreq_ctx; goto fail_arreq_ctx;
context_init(&ohci->at_request_ctx, ohci, err = context_init(&ohci->at_request_ctx, ohci,
OHCI1394_AsReqTrContextControlSet, handle_at_packet); OHCI1394_AsReqTrContextControlSet, handle_at_packet);
if (err < 0)
goto fail_arrsp_ctx;
context_init(&ohci->at_response_ctx, ohci, err = context_init(&ohci->at_response_ctx, ohci,
OHCI1394_AsRspTrContextControlSet, handle_at_packet); OHCI1394_AsRspTrContextControlSet, handle_at_packet);
if (err < 0)
goto fail_atreq_ctx;
reg_write(ohci, OHCI1394_IsoRecvIntMaskSet, ~0); reg_write(ohci, OHCI1394_IsoRecvIntMaskSet, ~0);
ohci->ir_context_channels = ~0ULL; ohci->ir_context_channels = ~0ULL;
...@@ -3163,7 +3167,9 @@ static int __devinit pci_probe(struct pci_dev *dev, ...@@ -3163,7 +3167,9 @@ static int __devinit pci_probe(struct pci_dev *dev,
kfree(ohci->ir_context_list); kfree(ohci->ir_context_list);
kfree(ohci->it_context_list); kfree(ohci->it_context_list);
context_release(&ohci->at_response_ctx); context_release(&ohci->at_response_ctx);
fail_atreq_ctx:
context_release(&ohci->at_request_ctx); context_release(&ohci->at_request_ctx);
fail_arrsp_ctx:
ar_context_release(&ohci->ar_response_ctx); ar_context_release(&ohci->ar_response_ctx);
fail_arreq_ctx: fail_arreq_ctx:
ar_context_release(&ohci->ar_request_ctx); ar_context_release(&ohci->ar_request_ctx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment