st_nci_hci_connectivity_event_received: null check the allocation
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Tue, 23 Jul 2019 22:11:51 +0000 (17:11 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2019 06:26:38 +0000 (08:26 +0200)
commit3e5e5f149dbfe86cab537d13591abe9826c12a3b
treec48f3a252d0b018cc187cac1bf93d314b024c444
parentdd8f6058951ab4d90bbc2e4f10fee73f01a7bb1c
st_nci_hci_connectivity_event_received: null check the allocation

[ Upstream commit 3008e06fdf0973770370f97d5f1fba3701d8281d ]

devm_kzalloc may fail and return NULL. So the null check is needed.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nfc/st-nci/se.c