mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
nfc: st21nfca: Remove unnecessary cast
In st21nfca_connectivity_event_received(), the return value of devm_kzalloc() is unnecessarily cast from void*. Remove cast. Issue identified with Coccinelle. Signed-off-by: Alex Dewar <alex.dewar90@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0eddbef648
commit
f8c931f3be
@ -315,8 +315,7 @@ int st21nfca_connectivity_event_received(struct nfc_hci_dev *hdev, u8 host,
|
|||||||
skb->data[0] != NFC_EVT_TRANSACTION_AID_TAG)
|
skb->data[0] != NFC_EVT_TRANSACTION_AID_TAG)
|
||||||
return -EPROTO;
|
return -EPROTO;
|
||||||
|
|
||||||
transaction = (struct nfc_evt_transaction *)devm_kzalloc(dev,
|
transaction = devm_kzalloc(dev, skb->len - 2, GFP_KERNEL);
|
||||||
skb->len - 2, GFP_KERNEL);
|
|
||||||
if (!transaction)
|
if (!transaction)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user