Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364748
b: refs/heads/master
c: 399e0f4
h: refs/heads/master
v: v3
  • Loading branch information
Virupax Sadashivpetimath authored and Felipe Balbi committed Mar 18, 2013
1 parent a268dab commit 886c34b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: 9ee1c7fbeab5b671d3b63f2dd33ad48235efcfe8
refs/heads/master: 399e0f4f00adbfdea2122c1daec0d4015f56cc7a
12 changes: 11 additions & 1 deletion trunk/drivers/usb/musb/ux500_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,17 @@ struct dma_controller *dma_controller_create(struct musb *musb, void __iomem *ba

controller = kzalloc(sizeof(*controller), GFP_KERNEL);
if (!controller)
return NULL;
goto kzalloc_fail;

controller->private_data = musb;

/* Save physical address for DMA controller. */
iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!iomem) {
dev_err(musb->controller, "no memory resource defined\n");
goto plat_get_fail;
}

controller->phy_base = (dma_addr_t) iomem->start;

controller->controller.start = ux500_dma_controller_start;
Expand All @@ -391,4 +396,9 @@ struct dma_controller *dma_controller_create(struct musb *musb, void __iomem *ba
controller->controller.is_compatible = ux500_dma_is_compatible;

return &controller->controller;

plat_get_fail:
kfree(controller);
kzalloc_fail:
return NULL;
}

0 comments on commit 886c34b

Please sign in to comment.