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:28:31 +0000 (08:28 +0200)
commitc5cb10632c0fb4a4a4f7782e87e40aa6257bff9b
treef22e5a1167e70fd2439059dab9621dddf01313da
parent0d73ba88f466b65a3c6877cc2cd16383a5548cba
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