Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
- index fd039db..0997a63 100644
- --- a/arch/arm/common/edma.c
- +++ b/arch/arm/common/edma.c
- @@ -1564,9 +1564,9 @@ static int __init edma_probe(struct platform_device *pdev)
- struct device_node *node = pdev->dev.of_node;
- struct device *dev = &pdev->dev;
- struct edma_soc_info *pdata;
- + int ret;
- if (node) {
- - int ret;
- pdata = devm_kzalloc(dev,
- sizeof(struct edma_soc_info),
- GFP_KERNEL);
- @@ -1588,15 +1588,18 @@ static int __init edma_probe(struct platform_device *pdev)
- return -ENODEV;
- for (j = 0; j < EDMA_MAX_CC; j++) {
- + if (!info[j]) {
- + if (found)
- + break;
- + else
- + return -ENODEV;
- + }
- if (node) {
- - int err;
- - err = of_address_to_resource(node, 0, &res[j]);
- - if (err) {
- - dev_err(dev,
- - "unable to find 'reg' property\n");
- - return -EIO;
- - }
- - r[j] = &res[j];
- + ret = of_address_to_resource(node, j, &res[j]);
- + if (IS_ERR_VALUE(ret))
- + r[j] = NULL;
- + else
- + r[j] = &res[j];
- } else {
- sprintf(res_name, "edma_cc%d", j);
- @@ -1604,7 +1607,7 @@ static int __init edma_probe(struct platform_device *pdev)
- IORESOURCE_MEM,
- res_name);
- }
- - if (!r[j] || !info[j]) {
- + if (!r[j]) {
- if (found)
- break;
- else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement