nfc: pn533: Fix error code in pn533_acr122_poweron_rdr()
Subsystems (4)
PATCH 1/1 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 <[email protected]>
--- drivers/nfc/pn533/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nfc/pn533/usb.c +1 -1
@@ -406,7 +406,7 @@ static int pn533_acr122_poweron_rdr(struct pn533_usb_phy *phy)if (rc || (transferred !=sizeof (cmd))) {nfc_err (&phy->udev->dev,"Reader power on cmd error %d\n" , rc); -return rc; +return rc ?: -EINVAL ; } rc =usb_submit_urb (phy->in_urb,GFP_KERNEL );
Signature · 1 line
2.51.0
Quoted 8 lines · Dan Carpenter
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 <[email protected]>--- drivers/nfc/pn533/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Why to me? I'm not the maintainer of NFC that I know of :)
And shouldn't this also cc: stable?
thanks,
greg k-h
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Tue, 9 Dec 2025 09:56:39 +0300 you wrote:
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 <[email protected]>--- drivers/nfc/pn533/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [net] nfc: pn533: Fix error code in pn533_acr122_poweron_rdr()
https://git.kernel.org/netdev/net/c/885bebac9909
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html