aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2018-03-24 10:44:59 -0300
committerSamuel Ortiz <sameo@linux.intel.com>2018-06-04 06:25:50 +0200
commit4e4e8232f0ae36573a66f40c765198baa75f327b (patch)
treef103010dc3e36f3d38bcc1160c49406ed513292e
parent6a893401a728236d9bec0575d73527992ca7929c (diff)
downloadnfc-next-4e4e8232f0ae36573a66f40c765198baa75f327b.tar.gz
nfc: st21nfca: Remove unnecessary devm_kzalloc() cast
There is no need to use cast for the returned value from memory allocation functions, so remove the unnecessary cast. Detected via Coccinelle script: scripts/coccinelle/api/alloc/alloc_cast.cocci. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--drivers/nfc/st21nfca/se.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nfc/st21nfca/se.c b/drivers/nfc/st21nfca/se.c
index fd967a38a94a5d..5b63549bf76a18 100644
--- a/drivers/nfc/st21nfca/se.c
+++ b/drivers/nfc/st21nfca/se.c
@@ -326,8 +326,7 @@ int st21nfca_connectivity_event_received(struct nfc_hci_dev *hdev, u8 host,
skb->data[0] != NFC_EVT_TRANSACTION_AID_TAG)
return -EPROTO;
- transaction = (struct nfc_evt_transaction *)devm_kzalloc(dev,
- skb->len - 2, GFP_KERNEL);
+ transaction = devm_kzalloc(dev, skb->len - 2, GFP_KERNEL);
if (!transaction)
return -ENOMEM;