bus: arm-ccn: Check memory allocation failure
commit595aca74c67a2a6ffa78c3760a0c3027b90c36a7
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 27 Aug 2017 10:06:50 +0000 (27 11:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:28:15 +0000 (14 09:28 +0100)
tree9358fb00f4e98d7edacb0d11fa48339b1a62451f
parenta0a2f97d03758c3d08ca68f587fe8062ff768fea
bus: arm-ccn: Check memory allocation failure

commit 24771179c5c138f0ea3ef88b7972979f62f2d5db upstream.

Check memory allocation failures and return -ENOMEM in such cases

This avoids a potential NULL pointer dereference.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/arm-ccn.c