]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: dwmmc: return a proper error code when busy
authorJohn Keeping <john@metanate.com>
Tue, 7 Dec 2021 16:09:35 +0000 (16:09 +0000)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 12 Jan 2022 00:56:40 +0000 (09:56 +0900)
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 <john@metanate.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/dw_mmc.c

index a949dad57402d454bc95a29f96ab545b7f5cbbae..4232c5eb8c31681e383dfddf3da7f3e4a6ce8e8e 100644 (file)
@@ -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;