daily pastebin goal
77%
SHARE
TWEET

Untitled

a guest Feb 19th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/edma.c b/edma.c
  2. index b43b327..6de8cd4 100644
  3. --- a/edma.c
  4. +++ b/edma.c
  5. @@ -1618,11 +1618,21 @@ static int __init edma_probe(struct platform_device *pdev)
  6.         int                     ret;
  7.  
  8.         if (node) {
  9. +               info = devm_kzalloc(dev, EDMA_MAX_CC * sizeof(*info),
  10. +                               GFP_KERNEL);
  11. +               if (info == NULL)
  12. +                       return -ENOMEM;
  13. +
  14.                 pdata = devm_kzalloc(dev,
  15.                                      EDMA_MAX_CC*sizeof(struct edma_soc_info),
  16.                                      GFP_KERNEL);
  17. +               if (pdata = NULL)
  18. +                       return -ENOMEM;
  19. +
  20.                 edma_of_parse_dt(dev, node, pdata);
  21. -               info = &pdata;
  22. +               for (i = 0; i < EDMA_MAX_CC; i++)
  23. +                       info[i] = &pdata[i];
  24. +
  25.                 dma_cap_set(DMA_SLAVE, edma_filter_info.dma_cap);
  26.                 of_dma_controller_register(dev->of_node,
  27.                                            of_dma_simple_xlate,
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top