mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
ste_dma40: One check less in d40_prep_sg() after error detection
* Adjust jump targets according to the Linux coding style convention. * Delete a repeated check which became unnecessary with this refactoring. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
8452b85906
commit
78c6e1a594
1 changed files with 5 additions and 6 deletions
|
@ -2253,7 +2253,7 @@ d40_prep_sg(struct dma_chan *dchan, struct scatterlist *sg_src,
|
||||||
|
|
||||||
desc = d40_prep_desc(chan, sg_src, sg_len, dma_flags);
|
desc = d40_prep_desc(chan, sg_src, sg_len, dma_flags);
|
||||||
if (desc == NULL)
|
if (desc == NULL)
|
||||||
goto err;
|
goto unlock;
|
||||||
|
|
||||||
if (sg_next(&sg_src[sg_len - 1]) == sg_src)
|
if (sg_next(&sg_src[sg_len - 1]) == sg_src)
|
||||||
desc->cyclic = true;
|
desc->cyclic = true;
|
||||||
|
@ -2273,7 +2273,7 @@ d40_prep_sg(struct dma_chan *dchan, struct scatterlist *sg_src,
|
||||||
if (ret) {
|
if (ret) {
|
||||||
chan_err(chan, "Failed to prepare %s sg job: %d\n",
|
chan_err(chan, "Failed to prepare %s sg job: %d\n",
|
||||||
chan_is_logical(chan) ? "log" : "phy", ret);
|
chan_is_logical(chan) ? "log" : "phy", ret);
|
||||||
goto err;
|
goto free_desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2285,10 +2285,9 @@ d40_prep_sg(struct dma_chan *dchan, struct scatterlist *sg_src,
|
||||||
spin_unlock_irqrestore(&chan->lock, flags);
|
spin_unlock_irqrestore(&chan->lock, flags);
|
||||||
|
|
||||||
return &desc->txd;
|
return &desc->txd;
|
||||||
|
free_desc:
|
||||||
err:
|
d40_desc_free(chan, desc);
|
||||||
if (desc)
|
unlock:
|
||||||
d40_desc_free(chan, desc);
|
|
||||||
spin_unlock_irqrestore(&chan->lock, flags);
|
spin_unlock_irqrestore(&chan->lock, flags);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue