aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/nfc/st21nfcb/st21nfcb_se.c4
-rw-r--r--net/nfc/nci/core.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/nfc/st21nfcb/st21nfcb_se.c b/drivers/nfc/st21nfcb/st21nfcb_se.c
index d23e8f27c4aa..7c82e9d87a65 100644
--- a/drivers/nfc/st21nfcb/st21nfcb_se.c
+++ b/drivers/nfc/st21nfcb/st21nfcb_se.c
@@ -499,10 +499,6 @@ static int st21nfcb_hci_network_init(struct nci_dev *ndev)
499 struct nci_conn_info *conn_info; 499 struct nci_conn_info *conn_info;
500 int r, dev_num; 500 int r, dev_num;
501 501
502 r = nci_nfcee_discover(ndev, NCI_NFCEE_DISCOVERY_ACTION_ENABLE);
503 if (r != NCI_STATUS_OK)
504 goto exit;
505
506 dest_params = 502 dest_params =
507 kzalloc(sizeof(struct core_conn_create_dest_spec_params) + 503 kzalloc(sizeof(struct core_conn_create_dest_spec_params) +
508 sizeof(struct dest_spec_params), GFP_KERNEL); 504 sizeof(struct dest_spec_params), GFP_KERNEL);
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index ddfe91e43c88..9575a1892607 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -880,10 +880,16 @@ static int nci_disable_se(struct nfc_dev *nfc_dev, u32 se_idx)
880 880
881static int nci_discover_se(struct nfc_dev *nfc_dev) 881static int nci_discover_se(struct nfc_dev *nfc_dev)
882{ 882{
883 int r;
883 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); 884 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
884 885
885 if (ndev->ops->discover_se) 886 if (ndev->ops->discover_se) {
887 r = nci_nfcee_discover(ndev, NCI_NFCEE_DISCOVERY_ACTION_ENABLE);
888 if (r != NCI_STATUS_OK)
889 return -EPROTO;
890
886 return ndev->ops->discover_se(ndev); 891 return ndev->ops->discover_se(ndev);
892 }
887 893
888 return 0; 894 return 0;
889} 895}