summaryrefslogtreecommitdiff
path: root/drivers/nfc/nfcsim.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-07-01 14:30:39 -0700
committerDavid S. Miller <davem@davemloft.net>2017-07-01 14:30:39 -0700
commit283131d20edd6f3629bf258e236aa6e44b1a8e27 (patch)
tree47ffbf798d7f0d87ba2b7cddf0f88ff7b3447cf0 /drivers/nfc/nfcsim.c
parent9d46b7701c30b308a3f3765bd33c1e69ccf4d9a2 (diff)
parentbd751808f9ff5e1822c627f6c4283009e66b2e53 (diff)
Merge tag 'nfc-next-4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next
Samuel Ortiz says: ==================== NFC 4.13 pull request This is the NFC pull requesy for 4.13. We have: - A conversion to unified device and GPIO APIs for the fdp, pn544, and st{21,-nci} drivers. - A fix for NFC device IDs allocation. - A fix for the nfcmrvl driver firmware download mechanism. - A trf7970a DT and GPIO cleanup and clock setting fix. - A few fixes for potential overflows in the digital and LLCP code. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/nfc/nfcsim.c')
-rw-r--r--drivers/nfc/nfcsim.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/nfc/nfcsim.c b/drivers/nfc/nfcsim.c
index a466e7978466..33449820e754 100644
--- a/drivers/nfc/nfcsim.c
+++ b/drivers/nfc/nfcsim.c
@@ -482,8 +482,10 @@ static int __init nfcsim_init(void)
exit_err:
pr_err("Failed to initialize nfcsim driver (%d)\n", rc);
- nfcsim_link_free(link0);
- nfcsim_link_free(link1);
+ if (link0)
+ nfcsim_link_free(link0);
+ if (link1)
+ nfcsim_link_free(link1);
return rc;
}