From: Andrew Morton Cc: David Brownell Cc: Sebastian Siewior Signed-off-by: Andrew Morton --- drivers/spi/spidev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/spi/spidev.c~spi-fix-the-read-path-in-spidev-cleanup drivers/spi/spidev.c --- a/drivers/spi/spidev.c~spi-fix-the-read-path-in-spidev-cleanup +++ a/drivers/spi/spidev.c @@ -171,7 +171,7 @@ spidev_read(struct file *filp, char __us unsigned long missing; missing = copy_to_user(buf, spidev->buffer, status); - if (status && missing == status) + if (missing == status) status = -EFAULT; else status = status - missing; _