[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] cadence_uart: shouldn't assume qemu_chr_fe_write() returns
From: |
Peter Maydell |
Subject: |
[Qemu-devel] cadence_uart: shouldn't assume qemu_chr_fe_write() returns non-negative value |
Date: |
Tue, 21 Jun 2016 13:35:45 +0100 |
This is something coverity spotted: in cadenc_uart_xmit(), the
code assumes that qemu_chr_fe_write() always returns the number
of bytes written, and subtracts it from the tx_count. However
it can also return a negative value indicating an error.
Could one of you fix this please? Skipping the adjustment of
tx_count and the memmove() if ret is negative should do I think.
thanks
-- PMM
- [Qemu-devel] cadence_uart: shouldn't assume qemu_chr_fe_write() returns non-negative value,
Peter Maydell <=