]> git.baikalelectronics.ru Git - uboot.git/commit
net: mvpp2x: add check after calloc
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 7 Mar 2018 02:39:04 +0000 (03:39 +0100)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 22 Mar 2018 20:05:28 +0000 (15:05 -0500)
commita621d6b69bf7f508d351295cfb211f834008225b
tree7d84064fa5455987960adc5ce9714f84d519fd8d
parent1ba88a7f22a80915448338c1861419d7b20ec344
net: mvpp2x: add check after calloc

After allocating plat the pointer is checked.
Afterwards name is allocated and not checked.

Add the missing check to avoid a possible NULL dereference.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/mvpp2.c