|
@@ -2930,6 +2930,11 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
|
|
|
num_chan = max_t(int, pi->pcfg.num_peri, pi->pcfg.num_chan);
|
|
|
|
|
|
pdmac->peripherals = kzalloc(num_chan * sizeof(*pch), GFP_KERNEL);
|
|
|
+ if (!pdmac->peripherals) {
|
|
|
+ ret = -ENOMEM;
|
|
|
+ dev_err(&adev->dev, "unable to allocate pdmac->peripherals\n");
|
|
|
+ goto probe_err5;
|
|
|
+ }
|
|
|
|
|
|
for (i = 0; i < num_chan; i++) {
|
|
|
pch = &pdmac->peripherals[i];
|