diff options
| author | Kedareswara rao Appana <appana.durga.rao@xilinx.com> | 2016-07-14 09:30:55 -0400 |
|---|---|---|
| committer | Vinod Koul <vinod.koul@intel.com> | 2016-07-24 01:49:22 -0400 |
| commit | caf5ee94be697f8df6d0292e19f3afa4d74745ce (patch) | |
| tree | 0b86f9e59408fe83aa9870b6b3c095d8f10a5d25 | |
| parent | ad52465b6c37a6a3c24b2455404f6f524a1ce14d (diff) | |
dmaengine: zynqmp_dma: Fix static checker warning
This patch fixes the below static checker warning
drivers/dma/xilinx/zynqmp_dma.c:973 zynqmp_dma_chan_probe()
warn: was && intended here instead of ||?
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| -rw-r--r-- | drivers/dma/xilinx/zynqmp_dma.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c index f777a5bc0db8..b18d51f7f38c 100644 --- a/drivers/dma/xilinx/zynqmp_dma.c +++ b/drivers/dma/xilinx/zynqmp_dma.c | |||
| @@ -970,12 +970,17 @@ static int zynqmp_dma_chan_probe(struct zynqmp_dma_device *zdev, | |||
| 970 | chan->dst_burst_len = ZYNQMP_DMA_AWLEN_RST_VAL; | 970 | chan->dst_burst_len = ZYNQMP_DMA_AWLEN_RST_VAL; |
| 971 | chan->src_burst_len = ZYNQMP_DMA_ARLEN_RST_VAL; | 971 | chan->src_burst_len = ZYNQMP_DMA_ARLEN_RST_VAL; |
| 972 | err = of_property_read_u32(node, "xlnx,bus-width", &chan->bus_width); | 972 | err = of_property_read_u32(node, "xlnx,bus-width", &chan->bus_width); |
| 973 | if ((err < 0) && ((chan->bus_width != ZYNQMP_DMA_BUS_WIDTH_64) || | 973 | if (err < 0) { |
| 974 | (chan->bus_width != ZYNQMP_DMA_BUS_WIDTH_128))) { | 974 | dev_err(&pdev->dev, "missing xlnx,bus-width property\n"); |
| 975 | dev_err(zdev->dev, "invalid bus-width value"); | ||
| 976 | return err; | 975 | return err; |
| 977 | } | 976 | } |
| 978 | 977 | ||
| 978 | if (chan->bus_width != ZYNQMP_DMA_BUS_WIDTH_64 && | ||
| 979 | chan->bus_width != ZYNQMP_DMA_BUS_WIDTH_128) { | ||
| 980 | dev_err(zdev->dev, "invalid bus-width value"); | ||
| 981 | return -EINVAL; | ||
| 982 | } | ||
| 983 | |||
| 979 | chan->is_dmacoherent = of_property_read_bool(node, "dma-coherent"); | 984 | chan->is_dmacoherent = of_property_read_bool(node, "dma-coherent"); |
| 980 | zdev->chan = chan; | 985 | zdev->chan = chan; |
| 981 | tasklet_init(&chan->tasklet, zynqmp_dma_do_tasklet, (ulong)chan); | 986 | tasklet_init(&chan->tasklet, zynqmp_dma_do_tasklet, (ulong)chan); |
