From: John Keeping Date: Tue, 7 Dec 2021 16:09:35 +0000 (+0000) Subject: mmc: dwmmc: return a proper error code when busy X-Git-Tag: v2025.01-rc5-pxa1908~1590^2~1 X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=66d0b7e1f2bdcfbb7a64a0ffc1fd63617b8dd995;p=u-boot.git mmc: dwmmc: return a proper error code when busy When failing to send a command because the hardware is busy, return EBUSY to indicate the cause instead of just -1. Signed-off-by: John Keeping Reviewed-by: Jaehoon Chung --- diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index a949dad574..4232c5eb8c 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -301,7 +301,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, flags = dwmci_set_transfer_mode(host, data); if ((cmd->resp_type & MMC_RSP_136) && (cmd->resp_type & MMC_RSP_BUSY)) - return -1; + return -EBUSY; if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION) flags |= DWMCI_CMD_ABORT_STOP;