mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-14 04:41:26 +00:00
ste_dma40: Move an assignment in d40_prep_desc()
Move one assignment for the local variable "cfg" so that its setting will only be performed after a call of the function "d40_desc_get" succeeded by this function. 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
254e1254ff
commit
8614591069
@ -2198,7 +2198,7 @@ static struct d40_desc *
|
|||||||
d40_prep_desc(struct d40_chan *chan, struct scatterlist *sg,
|
d40_prep_desc(struct d40_chan *chan, struct scatterlist *sg,
|
||||||
unsigned int sg_len, unsigned long dma_flags)
|
unsigned int sg_len, unsigned long dma_flags)
|
||||||
{
|
{
|
||||||
struct stedma40_chan_cfg *cfg = &chan->dma_cfg;
|
struct stedma40_chan_cfg *cfg;
|
||||||
struct d40_desc *desc;
|
struct d40_desc *desc;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -2206,6 +2206,7 @@ d40_prep_desc(struct d40_chan *chan, struct scatterlist *sg,
|
|||||||
if (!desc)
|
if (!desc)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
cfg = &chan->dma_cfg;
|
||||||
desc->lli_len = d40_sg_2_dmalen(sg, sg_len, cfg->src_info.data_width,
|
desc->lli_len = d40_sg_2_dmalen(sg, sg_len, cfg->src_info.data_width,
|
||||||
cfg->dst_info.data_width);
|
cfg->dst_info.data_width);
|
||||||
if (desc->lli_len < 0) {
|
if (desc->lli_len < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user