[PATCH 5/6] MCI/MXS: report a better matching error code when the transfer fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



EIO is a better error message to describe the data transfer to or from the SD cards has failed.

Signed-off-by: Juergen Beisert <jbe@xxxxxxxxxxxxxx>
---
 drivers/mci/mxs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mci/mxs.c b/drivers/mci/mxs.c
index 3045e6a..c15461c 100644
--- a/drivers/mci/mxs.c
+++ b/drivers/mci/mxs.c
@@ -186,7 +186,7 @@ static int mxs_mci_read_data(struct mxs_mci_host *mxs_mci, void *buffer, unsigne
 	if (length == 0)
 		return 0;
 
-	return -EINVAL;
+	return -EIO;
 }
 
 
@@ -223,7 +223,7 @@ static int mxs_mci_write_data(struct mxs_mci_host *mxs_mci, const void *buffer,
 	if (length == 0)
 		return 0;
 
-	return -EINVAL;
+	return -EIO;
 }
 
 /**
-- 
1.8.2.rc2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux