* [PATCH net] nfc: pn533: Fix error code in pn533_acr122_poweron_rdr()
@ 2025-12-09 6:56 Dan Carpenter
2025-12-09 7:00 ` Greg Kroah-Hartman
2025-12-11 9:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2025-12-09 6:56 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Krzysztof Kozlowski, Johan Hovold, netdev, linux-kernel,
kernel-janitors
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>
---
drivers/nfc/pn533/usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/pn533/usb.c b/drivers/nfc/pn533/usb.c
index ffd7367ce119..018a80674f06 100644
--- a/drivers/nfc/pn533/usb.c
+++ b/drivers/nfc/pn533/usb.c
@@ -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);
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net] nfc: pn533: Fix error code in pn533_acr122_poweron_rdr()
2025-12-09 6:56 [PATCH net] nfc: pn533: Fix error code in pn533_acr122_poweron_rdr() Dan Carpenter
@ 2025-12-09 7:00 ` Greg Kroah-Hartman
2025-12-11 9:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2025-12-09 7:00 UTC (permalink / raw)
To: Dan Carpenter
Cc: Krzysztof Kozlowski, Johan Hovold, netdev, linux-kernel,
kernel-janitors
On Tue, Dec 09, 2025 at 09:56:39AM +0300, Dan Carpenter 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 <dan.carpenter@linaro.org>
> ---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net] nfc: pn533: Fix error code in pn533_acr122_poweron_rdr()
2025-12-09 6:56 [PATCH net] nfc: pn533: Fix error code in pn533_acr122_poweron_rdr() Dan Carpenter
2025-12-09 7:00 ` Greg Kroah-Hartman
@ 2025-12-11 9:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-12-11 9:40 UTC (permalink / raw)
To: Dan Carpenter; +Cc: gregkh, krzk, johan, netdev, linux-kernel, kernel-janitors
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
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 <dan.carpenter@linaro.org>
> ---
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-11 9:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-09 6:56 [PATCH net] nfc: pn533: Fix error code in pn533_acr122_poweron_rdr() Dan Carpenter
2025-12-09 7:00 ` Greg Kroah-Hartman
2025-12-11 9:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).