diff options
author | Aditya Pakki <pakki001@umn.edu> | 2018-12-28 13:26:41 -0600 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2019-01-07 09:52:24 +0530 |
commit | 906b40b246b0acb54c4dc97e815cf734761c9820 (patch) | |
tree | 32eab12466d21fff799abded3678bcb8a1ba7e7d | |
parent | bfeffd155283772bbe78c6a05dec7c0128ee500c (diff) | |
download | linux-906b40b246b0acb54c4dc97e815cf734761c9820.tar.bz2 |
dmaengine: stm32-mdma: Add a check on read_u32_array
In stm32_mdma_probe, after reading the property "st,ahb-addr-masks", the
second call is not checked for failure. This time of check to time of use
case of "count" error is sent upstream.
Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Acked-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r-- | drivers/dma/stm32-mdma.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32-mdma.c index 390e4cae0e1a..485dea177704 100644 --- a/drivers/dma/stm32-mdma.c +++ b/drivers/dma/stm32-mdma.c @@ -1579,9 +1579,11 @@ static int stm32_mdma_probe(struct platform_device *pdev) dmadev->nr_channels = nr_channels; dmadev->nr_requests = nr_requests; - device_property_read_u32_array(&pdev->dev, "st,ahb-addr-masks", + ret = device_property_read_u32_array(&pdev->dev, "st,ahb-addr-masks", dmadev->ahb_addr_masks, count); + if (ret) + return ret; dmadev->nr_ahb_addr_masks = count; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |