linux-sg2042/drivers/nfc/nfcmrvl
Johan Hovold c3953a3c2d NFC: nfcmrvl: fix gpio-handling regression
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: e33a3f84f8 ("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>
2019-08-05 10:25:48 -07:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fw_dnld.c treewide: setup_timer() -> timer_setup() (2 field) 2017-11-21 15:57:09 -08:00
fw_dnld.h NFC: nfcmrvl: add firmware download support 2015-10-27 04:18:44 +01:00
i2c.c nfc: nfcmrvl: constify i2c_device_id 2017-11-06 00:56:55 +01:00
main.c NFC: nfcmrvl: fix gpio-handling regression 2019-08-05 10:25:48 -07:00
nfcmrvl.h NFC: nfcmrvl: add i2c driver 2015-10-27 04:21:14 +01:00
spi.c NFC: nfcmrvl: double free on error path 2017-04-02 00:09:17 +02:00
uart.c NFC: nfcmrvl: fix gpio-handling regression 2019-08-05 10:25:48 -07:00
usb.c NFC: nfcmrvl: fix gpio-handling regression 2019-08-05 10:25:48 -07:00