]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix copy_to_user usage for pipe_crc
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 3 Aug 2016 15:22:57 +0000 (08:22 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Fri, 5 Aug 2016 16:39:47 +0000 (09:39 -0700)
commitb14d956acd7a287f6d3eb455b1d7681d7680044a
tree2ccca24d811228b3cce05268d0f48f70548decc5
parentdebbed10cac71b06c6209d801430f3b4cdfd01c2
drm/i915: Fix copy_to_user usage for pipe_crc

Copy to user return the number of bytes it couldn't write
and zero on success. So any number different than 0 should
be considered a fault, not only when it doesn't write
the full size.

v2: fixed the inverted logic. (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/i915_debugfs.c