From 3590ebc040c9ee5d06754ce926f0e7c3a595e46d Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 7 Apr 2015 00:17:00 -0700 Subject: NFC: logging neatening Add missing terminating newlines to nfc_info and nfc_err to avoid possible interleaving from other messages. Miscellanea: o typo fix of "unknonwn" in message o remove unnecessary OOM messages as there's a generic dump_stack() o realign arguments Signed-off-by: Joe Perches Signed-off-by: Samuel Ortiz --- drivers/nfc/st21nfcb/i2c.c | 5 +---- drivers/nfc/st21nfcb/ndlc.c | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'drivers/nfc/st21nfcb') diff --git a/drivers/nfc/st21nfcb/i2c.c b/drivers/nfc/st21nfcb/i2c.c index 7b53a5c84041..76a4cad41cec 100644 --- a/drivers/nfc/st21nfcb/i2c.c +++ b/drivers/nfc/st21nfcb/i2c.c @@ -313,11 +313,8 @@ static int st21nfcb_nci_i2c_probe(struct i2c_client *client, phy = devm_kzalloc(&client->dev, sizeof(struct st21nfcb_i2c_phy), GFP_KERNEL); - if (!phy) { - nfc_err(&client->dev, - "Cannot allocate memory for st21nfcb i2c phy.\n"); + if (!phy) return -ENOMEM; - } phy->i2c_dev = client; 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; -- cgit v1.2.3