From: Eli Billauer Date: Fri, 27 Mar 2015 08:56:06 +0000 (+0300) Subject: char: xillybus: Don't return -EFAULT on user-triggered flush X-Git-Tag: omap-for-v4.2/o2_dc~63^2~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=127af8828518074ab24e9b5678229513d198d832;p=pandora-kernel.git char: xillybus: Don't return -EFAULT on user-triggered flush The API allows the application to flush a host-to-FPGA stream by calling write() with the data count set to zero. Before this patch, copy_from_user() was called with a non-zero byte count, which possibly made it attempt to read from unmapped user memory. Such attempts caused the driver to return -EFAULT instead of 0, even though the desired operation went through fine. This patch ensures the driver returns 0 on a successful flush. Signed-off-by: Eli Billauer Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed