Commit 8d64fc50 authored by Laurentiu-Cristian Duca's avatar Laurentiu-Cristian Duca Committed by Jan Kiszka

spi: fix read() return code checking in spi_master_read_rt()

spi-master.c: spi_master_read_rt(): when master->ops->read()
completes successfully it returns > 0, so, in this case,
copy data to userspace.
Signed-off-by: default avatarLaurentiu-Cristian Duca <>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent 7fc4489a
......@@ -240,8 +240,8 @@ static ssize_t spi_master_read_rt(struct rtdm_fd *fd,
if (ret == 0)
ret = rtdm_safe_copy_to_user(fd, u_buf, rx, len);
if (ret > 0)
ret = rtdm_safe_copy_to_user(fd, u_buf, rx, ret);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment