mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 23:47:06 +00:00
If the copy_to_user() fails we should unlock and return directly without
updating "cnt". Also the return value should be -EFAULT instead of the
number of bytes remaining.
Fixes: 02b23803c6 ("staging: android: ion: Add ioctl to query available heaps")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>