Commit f70f95b
serial: msm: check dma_map_sg() return value properly
The -next commit f8fef2f (tty: msm_serial: use
dmaengine_prep_slave_sg()), switched to using dma_map_sg(). But the
return value of dma_map_sg() is special: it returns number of elements
mapped. And not a standard error value.
The commit also forgot to reset dma->tx_sg in case of this failure.
Fix both these mistakes.
Thanks to Marek who helped debugging this.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20240419080931.30949-1-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent c6795fb commit f70f95b
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| 502 | + | |
502 | 503 | | |
503 | 504 | | |
504 | 505 | | |
505 | 506 | | |
506 | 507 | | |
507 | 508 | | |
508 | | - | |
509 | | - | |
510 | | - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
511 | 514 | | |
512 | 515 | | |
513 | 516 | | |
| |||
548 | 551 | | |
549 | 552 | | |
550 | 553 | | |
| 554 | + | |
551 | 555 | | |
552 | 556 | | |
553 | 557 | | |
| |||
0 commit comments