diff options
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r-- | drivers/dma/pl330.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index a3b26ada8122..f5843bc80baa 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
@@ -2930,6 +2930,11 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) | |||
2930 | num_chan = max_t(int, pi->pcfg.num_peri, pi->pcfg.num_chan); | 2930 | num_chan = max_t(int, pi->pcfg.num_peri, pi->pcfg.num_chan); |
2931 | 2931 | ||
2932 | pdmac->peripherals = kzalloc(num_chan * sizeof(*pch), GFP_KERNEL); | 2932 | pdmac->peripherals = kzalloc(num_chan * sizeof(*pch), GFP_KERNEL); |
2933 | if (!pdmac->peripherals) { | ||
2934 | ret = -ENOMEM; | ||
2935 | dev_err(&adev->dev, "unable to allocate pdmac->peripherals\n"); | ||
2936 | goto probe_err5; | ||
2937 | } | ||
2933 | 2938 | ||
2934 | for (i = 0; i < num_chan; i++) { | 2939 | for (i = 0; i < num_chan; i++) { |
2935 | pch = &pdmac->peripherals[i]; | 2940 | pch = &pdmac->peripherals[i]; |