From: Philippe Mathieu-Daudé Date: Tue, 29 Jul 2025 13:56:39 +0000 (+0200) Subject: hw/sd/sdcard: Do not ignore errors in sd_cmd_to_sendingdata() X-Git-Tag: v10.1.0-rc2~1^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a9a27305da030a83e65714f6ba202dbcaf448a3;p=thirdparty%2Fqemu.git hw/sd/sdcard: Do not ignore errors in sd_cmd_to_sendingdata() Unfortunately when adding sd_cmd_to_sendingdata() in commit f486bf7d109 we neglected to return any possible error. Fix. Fixes: f486bf7d109 ("hw/sd/sdcard: Introduce sd_cmd_to_sendingdata and sd_generic_read_byte") Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20250804133406.17456-2-philmd@linaro.org> --- diff --git a/hw/sd/sd.c b/hw/sd/sd.c index c275fdda2d0..0bb385268ed 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1305,7 +1305,7 @@ static sd_rsp_type_t sd_cmd_to_sendingdata(SDState *sd, SDRequest req, const void *data, size_t size) { if (sd->state != sd_transfer_state) { - sd_invalid_state_for_cmd(sd, req); + return sd_invalid_state_for_cmd(sd, req); } sd->state = sd_sendingdata_state;