From 2f8e20bcb4149b0e7ae4c1b28ca71c2b6c90751e Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 23 Sep 2011 09:14:35 +0300 Subject: [PATCH] --- yaml --- r: 266387 b: refs/heads/master c: 8ebafde00ed0c682fed8c34ac5ba90160ea0bb30 h: refs/heads/master i: 266385: a0e112437516aba11715ec5dc005f921bc6d911f 266383: 91edbb6c9c39ab05d4dee75305fa3d9bb208749f v: v3 --- [refs] | 2 +- trunk/net/nfc/nci/core.c | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 144f36eb284f..b720e0d988c6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 84b1bec6d716fc8c289e2530cab109a6e097455b +refs/heads/master: 8ebafde00ed0c682fed8c34ac5ba90160ea0bb30 diff --git a/trunk/net/nfc/nci/core.c b/trunk/net/nfc/nci/core.c index 1e6b20f2bc99..4047e29acb3b 100644 --- a/trunk/net/nfc/nci/core.c +++ b/trunk/net/nfc/nci/core.c @@ -499,19 +499,19 @@ struct nci_dev *nci_allocate_device(struct nci_ops *ops, int tx_headroom, int tx_tailroom) { - struct nci_dev *ndev = NULL; + struct nci_dev *ndev; nfc_dbg("entry, supported_protocols 0x%x", supported_protocols); if (!ops->open || !ops->close || !ops->send) - goto exit; + return NULL; if (!supported_protocols) - goto exit; + return NULL; ndev = kzalloc(sizeof(struct nci_dev), GFP_KERNEL); if (!ndev) - goto exit; + return NULL; ndev->ops = ops; ndev->tx_headroom = tx_headroom; @@ -526,13 +526,11 @@ struct nci_dev *nci_allocate_device(struct nci_ops *ops, nfc_set_drvdata(ndev->nfc_dev, ndev); - goto exit; + return ndev; free_exit: kfree(ndev); - -exit: - return ndev; + return NULL; } EXPORT_SYMBOL(nci_allocate_device);