Skip to content
Commit c3953a3c authored by Johan Hovold's avatar Johan Hovold Committed by David S. Miller
Browse files

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: e33a3f84 ("NFC: nfcmrvl: allow gpio 0 for reset signalling")
Reported-by: default avatar <syzbot+cf35b76f35e068a1107f@syzkaller.appspotmail.com>
Tested-by: default avatar <syzbot+cf35b76f35e068a1107f@syzkaller.appspotmail.com>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 5e5412c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment