Skip to content

Commit faeb073

Browse files
Shravya Kumbhamvinodkoul
Shravya Kumbham
authored andcommitted
dmaengine: xilinx_dma: fix incompatible param warning in _child_probe()
In xilinx_dma_child_probe function, the nr_channels variable is passed to of_property_read_u32() which expects an u32 return value pointer. Modify the nr_channels variable type from int to u32 to fix the incompatible parameter coverity warning. Addresses-Coverity: Event incompatible_param. Fixes: 1a9e7a0 ("dmaengine: vdma: Add support for mulit-channel dma mode") Signed-off-by: Shravya Kumbham <[email protected]> Signed-off-by: Radhey Shyam Pandey <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 99974ae commit faeb073

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/dma/xilinx/xilinx_dma.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2900,7 +2900,8 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
29002900
static int xilinx_dma_child_probe(struct xilinx_dma_device *xdev,
29012901
struct device_node *node)
29022902
{
2903-
int ret, i, nr_channels = 1;
2903+
int ret, i;
2904+
u32 nr_channels = 1;
29042905

29052906
ret = of_property_read_u32(node, "dma-channels", &nr_channels);
29062907
if (xdev->dma_config->dmatype == XDMA_TYPE_AXIMCDMA && ret < 0)

0 commit comments

Comments
 (0)