summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorShravya Kumbham <shravya.kumbham@xilinx.com>2020-12-23 16:51:01 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-17 14:05:36 +0100
commitd0eaf8a8eff8775cb195dfb746979cc7b281dd38 (patch)
treefbfc109ae158b16ca82486d321b4e79384c71dba /drivers
parente6f247a5f927c1c1f070af15a84d2d65cec56549 (diff)
downloadlinux-d0eaf8a8eff8775cb195dfb746979cc7b281dd38.tar.gz
linux-d0eaf8a8eff8775cb195dfb746979cc7b281dd38.tar.bz2
linux-d0eaf8a8eff8775cb195dfb746979cc7b281dd38.zip
dmaengine: xilinx_dma: fix incompatible param warning in _child_probe()
commit faeb0731be0a31e2246b21a85fa7dabbd750101d upstream. 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: 1a9e7a03c761 ("dmaengine: vdma: Add support for mulit-channel dma mode") Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com> Link: https://lore.kernel.org/r/1608722462-29519-3-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dma/xilinx/xilinx_dma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 73cb2362322f..e9e5c4ede9fa 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -2543,7 +2543,8 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
static int xilinx_dma_child_probe(struct xilinx_dma_device *xdev,
struct device_node *node)
{
- int ret, i, nr_channels = 1;
+ int ret, i;
+ u32 nr_channels = 1;
ret = of_property_read_u32(node, "dma-channels", &nr_channels);
if ((ret < 0) && xdev->mcdma)