* [PATCH] NFC: pn533: fix error return code in pn533_probe()
@ 2013-05-07 12:07 Wei Yongjun
2013-05-16 22:16 ` Samuel Ortiz
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-05-07 12:07 UTC (permalink / raw)
To: lauro.venancio, aloisio.almeida, sameo
Cc: yongjun_wei, linux-wireless, linux-nfc
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Fix to return -ENOMEM in the nfc device alloc error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/nfc/pn533.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c
index 8f6f2ba..0bdfa88 100644
--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -2783,8 +2783,10 @@ static int pn533_probe(struct usb_interface *interface,
dev->ops->tx_header_len +
PN533_CMD_DATAEXCH_HEAD_LEN,
dev->ops->tx_tail_len);
- if (!dev->nfc_dev)
+ if (!dev->nfc_dev) {
+ rc = -ENOMEM;
goto destroy_wq;
+ }
nfc_set_parent_dev(dev->nfc_dev, &interface->dev);
nfc_set_drvdata(dev->nfc_dev, dev);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFC: pn533: fix error return code in pn533_probe()
2013-05-07 12:07 [PATCH] NFC: pn533: fix error return code in pn533_probe() Wei Yongjun
@ 2013-05-16 22:16 ` Samuel Ortiz
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2013-05-16 22:16 UTC (permalink / raw)
To: Wei Yongjun
Cc: lauro.venancio, aloisio.almeida, yongjun_wei, linux-wireless,
linux-nfc
Hi Wei,
On Tue, May 07, 2013 at 08:07:52PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Fix to return -ENOMEM in the nfc device alloc error handling
> case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/nfc/pn533.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Applied to nfc-next, thanks.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-16 22:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-07 12:07 [PATCH] NFC: pn533: fix error return code in pn533_probe() Wei Yongjun
2013-05-16 22:16 ` Samuel Ortiz
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).