Skip to content

Commit 906b40b

Browse files
Aditya Pakkivinodkoul
authored andcommitted
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>
1 parent bfeffd1 commit 906b40b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/dma/stm32-mdma.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,9 +1579,11 @@ static int stm32_mdma_probe(struct platform_device *pdev)
15791579

15801580
dmadev->nr_channels = nr_channels;
15811581
dmadev->nr_requests = nr_requests;
1582-
device_property_read_u32_array(&pdev->dev, "st,ahb-addr-masks",
1582+
ret = device_property_read_u32_array(&pdev->dev, "st,ahb-addr-masks",
15831583
dmadev->ahb_addr_masks,
15841584
count);
1585+
if (ret)
1586+
return ret;
15851587
dmadev->nr_ahb_addr_masks = count;
15861588

15871589
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

0 commit comments

Comments
 (0)