Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338607
b: refs/heads/master
c: 3921426
h: refs/heads/master
i:
  338605: 32a849a
  338603: 3336c51
  338599: 678016f
  338591: 80223f2
v: v3
  • Loading branch information
Felipe Balbi committed Oct 15, 2012
1 parent 0010364 commit d4ea83d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 380f0d28431e852e07e3fa0d5f6e36cf9ea5aa5a
refs/heads/master: 3921426b13b1e0b2db6872a8d22d9fe2a4afe332
25 changes: 12 additions & 13 deletions trunk/drivers/usb/dwc3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,32 +381,21 @@ static int __devinit dwc3_core_init(struct dwc3 *dwc)

dwc3_writel(dwc->regs, DWC3_GCTL, reg);

ret = dwc3_alloc_event_buffers(dwc, DWC3_EVENT_BUFFERS_SIZE);
if (ret) {
dev_err(dwc->dev, "failed to allocate event buffers\n");
ret = -ENOMEM;
goto err1;
}

ret = dwc3_event_buffers_setup(dwc);
if (ret) {
dev_err(dwc->dev, "failed to setup event buffers\n");
goto err1;
goto err0;
}

return 0;

err1:
dwc3_free_event_buffers(dwc);

err0:
return ret;
}

static void dwc3_core_exit(struct dwc3 *dwc)
{
dwc3_event_buffers_cleanup(dwc);
dwc3_free_event_buffers(dwc);
}

#define DWC3_ALIGN_MASK (16 - 1)
Expand Down Expand Up @@ -509,10 +498,17 @@ static int __devinit dwc3_probe(struct platform_device *pdev)
pm_runtime_get_sync(dev);
pm_runtime_forbid(dev);

ret = dwc3_alloc_event_buffers(dwc, DWC3_EVENT_BUFFERS_SIZE);
if (ret) {
dev_err(dwc->dev, "failed to allocate event buffers\n");
ret = -ENOMEM;
goto err0;
}

ret = dwc3_core_init(dwc);
if (ret) {
dev_err(dev, "failed to initialize core\n");
return ret;
goto err0;
}

mode = DWC3_MODE(dwc->hwparams.hwparams0);
Expand Down Expand Up @@ -584,6 +580,9 @@ static int __devinit dwc3_probe(struct platform_device *pdev)
err1:
dwc3_core_exit(dwc);

err0:
dwc3_free_event_buffers(dwc);

return ret;
}

Expand Down

0 comments on commit d4ea83d

Please sign in to comment.