]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: mockup: return -EFAULT if copy_from_user() fails
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 14 Feb 2017 23:02:06 +0000 (02:02 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 6 Mar 2017 13:35:21 +0000 (14:35 +0100)
commitc5a41056f5ce617fbf0c621aa3963deb10b118d9
treec0d0cbce48775859ff1800c2b0a3ca301e5eb13a
parent6b777615a1f420d953a879fac36a54ae8ebd59d0
gpio: mockup: return -EFAULT if copy_from_user() fails

copy_from_user() returns the number of bytes remaining to be copied but
we want to return negative error codes on failue.

Fixes: 72a5f23bc178 ("gpio: mockup: implement event injecting over debugfs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mockup.c