Commit 906b40b2 authored by Aditya Pakki's avatar Aditya Pakki Committed by Vinod Koul

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: default avatarAditya Pakki <pakki001@umn.edu>
Acked-by: default avatarPierre-Yves MORDRET <pierre-yves.mordret@st.com>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent bfeffd15
...@@ -1579,9 +1579,11 @@ static int stm32_mdma_probe(struct platform_device *pdev) ...@@ -1579,9 +1579,11 @@ static int stm32_mdma_probe(struct platform_device *pdev)
dmadev->nr_channels = nr_channels; dmadev->nr_channels = nr_channels;
dmadev->nr_requests = nr_requests; 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, dmadev->ahb_addr_masks,
count); count);
if (ret)
return ret;
dmadev->nr_ahb_addr_masks = count; dmadev->nr_ahb_addr_masks = count;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment