diff options
author | Johan Hovold <johan@kernel.org> | 2019-08-05 12:00:55 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-09 17:53:35 +0200 |
commit | 8fe9cc0fa2c88ad991f542d680bca88e0e18f787 (patch) | |
tree | 330017a6ee7cd86f391aeb346b6ac8c5aeb691fa /net/tipc/core.c | |
parent | 9838c90727b07e3e7c6dbf6cbe4634c07cc9fb60 (diff) |
NFC: nfcmrvl: fix gpio-handling regression
[ Upstream commit c3953a3c2d3175d2f9f0304c9a1ba89e7743c5e4 ]
Fix two reset-gpio sanity checks which were never converted to use
gpio_is_valid(), and make sure to use -EINVAL to indicate a missing
reset line also for the UART-driver module parameter and for the USB
driver.
This specifically prevents the UART and USB drivers from incidentally
trying to request and use gpio 0, and also avoids triggering a WARN() in
gpio_to_desc() during probe when no valid reset line has been specified.
Fixes: e33a3f84f88f ("NFC: nfcmrvl: allow gpio 0 for reset signalling")
Reported-by: syzbot+cf35b76f35e068a1107f@syzkaller.appspotmail.com
Tested-by: syzbot+cf35b76f35e068a1107f@syzkaller.appspotmail.com
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/tipc/core.c')
0 files changed, 0 insertions, 0 deletions