bus: arm-ccn: Check memory allocation failure
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 27 Aug 2017 10:06:50 +0000 (11:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:53:03 +0000 (09:53 +0100)
commita724b569a50d2e94fd2d3ea123e1b5ad32293c61
treedcb5dbdc290c969281395c0b305a1d7dbc7507d8
parent2ced9e2a850c40d3bfd7af4791f985318facff68
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