diff options
Diffstat (limited to 'drivers/nfc/st21nfcb/ndlc.c')
-rw-r--r-- | drivers/nfc/st21nfcb/ndlc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/nfc/st21nfcb/ndlc.c b/drivers/nfc/st21nfcb/ndlc.c index 5fbf59d2138c..6014b5859465 100644 --- a/drivers/nfc/st21nfcb/ndlc.c +++ b/drivers/nfc/st21nfcb/ndlc.c @@ -256,10 +256,9 @@ int ndlc_probe(void *phy_id, struct nfc_phy_ops *phy_ops, struct device *dev, struct llt_ndlc *ndlc; ndlc = devm_kzalloc(dev, sizeof(struct llt_ndlc), GFP_KERNEL); - if (!ndlc) { - nfc_err(dev, "Cannot allocate memory for ndlc.\n"); + if (!ndlc) return -ENOMEM; - } + ndlc->ops = phy_ops; ndlc->phy_id = phy_id; ndlc->dev = dev; |