diff options
author | Pan Bian <bianpan2016@163.com> | 2016-12-03 09:56:49 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-11 09:11:39 +0100 |
commit | 5b11ebedd6a8bb4271b796e498cd15c0fe1133b6 (patch) | |
tree | c0b0c61921982c62c49ec4824616a646409237dd /drivers/char/ppdev.c | |
parent | drivers: char: mem: Fix thinkos in kmem address checks (diff) | |
download | linux-5b11ebedd6a8bb4271b796e498cd15c0fe1133b6.tar.xz linux-5b11ebedd6a8bb4271b796e498cd15c0fe1133b6.zip |
extcon: return error code on failure
Function get_zeroed_page() returns a NULL pointer if there is no enough
memory. In function extcon_sync(), it returns 0 if the call to
get_zeroed_page() fails. The return value 0 indicates success in the
context, which is incosistent with the execution status. This patch
fixes the bug by returning -ENOMEM.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188611
Signed-off-by: Pan Bian <bianpan2016@163.com>
Fixes: a580982f0836e
Cc: stable <stable@vger.kernel.org>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/ppdev.c')
0 files changed, 0 insertions, 0 deletions