amba_set_drvdata(adev, pdmac);
irq = adev->irq[0];
- ret = request_irq(irq, pl330_irq_handler, 0,
+ ret = devm_request_irq(&adev->dev, irq, pl330_irq_handler, 0,
dev_name(&adev->dev), pi);
if (ret)
return ret;
pi->pcfg.periph_id = adev->periphid;
ret = pl330_add(pi);
if (ret)
- goto probe_err1;
+ return ret;
INIT_LIST_HEAD(&pdmac->desc_pool);
spin_lock_init(&pdmac->pool_lock);
}
probe_err2:
pl330_del(pi);
-probe_err1:
- free_irq(irq, pi);
return ret;
}
struct dma_pl330_dmac *pdmac = amba_get_drvdata(adev);
struct dma_pl330_chan *pch, *_p;
struct pl330_info *pi;
- int irq;
if (!pdmac)
return 0;
pl330_del(pi);
- irq = adev->irq[0];
- free_irq(irq, pi);
-
return 0;
}