summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-07 20:07:52 +0800
committerSamuel Ortiz <sameo@linux.intel.com>2013-06-14 00:18:58 +0200
commit4674d0fecbeeb9731274f03ff35a108630be4585 (patch)
tree61219be811292cb451a452bef0e8de64d5fa85bd /drivers
parenta69bdc1ecd032fda1bc808fa0e1634bbc9417ad5 (diff)
NFC: pn533: Fix error return code in pn533_probe()
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> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nfc/pn533.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c
index 8f6f2baa930..0bdfa8852e7 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);