Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nfc: pn533: Fix error code in pn533_acr122_poweron_rdr()

Set the error code if "transferred != sizeof(cmd)" instead of
returning success.

Fixes: dbafc28955fa ("NFC: pn533: don't send USB data off of the stack")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aTfIJ9tZPmeUF4W1@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Dan Carpenter and committed by
Jakub Kicinski
885bebac 5914428e

+1 -1
+1 -1
drivers/nfc/pn533/usb.c
··· 406 406 if (rc || (transferred != sizeof(cmd))) { 407 407 nfc_err(&phy->udev->dev, 408 408 "Reader power on cmd error %d\n", rc); 409 - return rc; 409 + return rc ?: -EINVAL; 410 410 } 411 411 412 412 rc = usb_submit_urb(phy->in_urb, GFP_KERNEL);