Re: [PATCH v2 06/12] hw/i3c: fix default return value of d2_i3c_send()
Philippe Mathieu-Daudé <[email protected]> Mon, 27 Jul 2026 09:40:03 +0200
| Newsgroups | org.kernel.vger.linux-cxl,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
On 26/7/26 22:44, Marc-André Lureau wrote:
> Fixes: 208772a189f9 ("hw/i3c/dw-i3c: Add data TX and RX")
> Signed-off-by: Marc-André Lureau <[email protected]>
> ---
> hw/i3c/dw-i3c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/i3c/dw-i3c.c b/hw/i3c/dw-i3c.c
> index 6386499dd9fc..7b887fbd60cb 100644
> --- a/hw/i3c/dw-i3c.c
> +++ b/hw/i3c/dw-i3c.c
> @@ -430,7 +430,7 @@ static int dw_i3c_send_start(DWI3C *s, uint8_t addr, bool is_recv, bool is_i2c)
> static int dw_i3c_send(DWI3C *s, const uint8_t *data, uint32_t num_to_send,
> uint32_t *num_sent, bool is_i2c)
> {
> - int ret;
> + int ret = 0;
So IIUC the issue is being called with num_to_send=0.
Can that happen? Apparently no. Could we assert it is
non-zero?