mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
spi: qup: Fix error handling in spi_qup_prep_sg
Signed-off-by: Varadarajan Narayanan <varada@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ce00bab318
commit
d9a09a6c0c
@ -311,8 +311,8 @@ static int spi_qup_prep_sg(struct spi_master *master, struct spi_transfer *xfer,
|
||||
}
|
||||
|
||||
desc = dmaengine_prep_slave_sg(chan, sgl, nents, dir, flags);
|
||||
if (!desc)
|
||||
return -EINVAL;
|
||||
if (IS_ERR_OR_NULL(desc))
|
||||
return desc ? PTR_ERR(desc) : -EINVAL;
|
||||
|
||||
desc->callback = callback;
|
||||
desc->callback_param = qup;
|
||||
|
Loading…
Reference in New Issue
Block a user