Skip to content

Commit 1e00833

Browse files
Colin Ian Kingvinodkoul
authored andcommitted
dmaengine: sh: Fix unused initialization of pointer lmdesc
Pointer lmdesc is being inintialized with a value that is never read, it is later being re-assigned a new value. Fix this by initializing it with the latter value. Addresses-Coverity: ("Unused value") Fixes: 550c591 ("dmaengine: sh: Add DMAC driver for RZ/G2L SoC") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210829152811.529766-1-colin.king@canonical.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 8f03149 commit 1e00833

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/dma/sh/rz-dmac.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,10 @@ static void rz_dmac_prepare_desc_for_memcpy(struct rz_dmac_chan *channel)
308308
{
309309
struct dma_chan *chan = &channel->vc.chan;
310310
struct rz_dmac *dmac = to_rz_dmac(chan->device);
311-
struct rz_lmdesc *lmdesc = channel->lmdesc.base;
311+
struct rz_lmdesc *lmdesc = channel->lmdesc.tail;
312312
struct rz_dmac_desc *d = channel->desc;
313313
u32 chcfg = CHCFG_MEM_COPY;
314314

315-
lmdesc = channel->lmdesc.tail;
316-
317315
/* prepare descriptor */
318316
lmdesc->sa = d->src;
319317
lmdesc->da = d->dest;

0 commit comments

Comments
 (0)