diff options
author | Keerthy <j-keerthy@ti.com> | 2019-04-24 16:33:54 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-05-03 07:23:17 -0400 |
commit | a3f25b925fe690be7744d47df0135321e43e2c2a (patch) | |
tree | bd916bfc3ac9bc4567c9241b08872eeb27da811e /drivers/dma/ti | |
parent | b4ee6daad7a2604ca9466b2ba48de86cc27d381f (diff) |
drivers: dma: ti: k3-udma: Extract packet data only when Meta data is not NULL
Currently packet data is wrongly extracted when metadata is NULL.
Fix it and negate the if check.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Diffstat (limited to 'drivers/dma/ti')
-rw-r--r-- | drivers/dma/ti/k3-udma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index f78a01aa8f..e9ca09d8d3 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -1492,7 +1492,7 @@ static int udma_send(struct dma *dma, void *src, size_t len, void *metadata) u32 tc_ring_id; int ret; - if (!metadata) + if (metadata) packet_data = *((struct ti_udma_drv_packet_data *)metadata); if (dma->id >= (ud->rchan_cnt + ud->tchan_cnt)) { |