From: Peter Ujfalusi Date: Wed, 24 Apr 2019 14:10:11 +0300 Subject: [U-Boot] [PATCH] drivers: dma: ti: k3-udma: Extract packet data only when Meta data is not NULL In-Reply-To: <20190424110354.5501-1-j-keerthy@ti.com> References: <20190424110354.5501-1-j-keerthy@ti.com> Message-ID: <14790ca6-8471-3acb-49ca-c1942c7c7ddf@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de On 24/04/2019 14.03, Keerthy wrote: > Currently packet data is wrongly extracted when metadata is NULL. > Fix it and negate the if check. Good catch. Reviewed-by: Peter Ujfalusi >=20 > Signed-off-by: Keerthy > Reviewed-by: Grygorii Strashko > --- > drivers/dma/ti/k3-udma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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, si= ze_t len, void *metadata) > u32 tc_ring_id; > int ret; > =20 > - if (!metadata) > + if (metadata) > packet_data =3D *((struct ti_udma_drv_packet_data *)metadata); > =20 > if (dma->id >=3D (ud->rchan_cnt + ud->tchan_cnt)) { >=20 - P=C3=A9ter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki