]> git.dujemihanovic.xyz Git - u-boot.git/commit
net: ks8851: Replace malloc()+memset() with calloc()
authorMarek Vasut <marex@denx.de>
Wed, 25 Mar 2020 15:52:38 +0000 (16:52 +0100)
committerMarek Vasut <marex@denx.de>
Fri, 22 May 2020 17:46:45 +0000 (19:46 +0200)
commite3b54cda6893726703a1fae66e9521bc231464cf
tree1dc2fb0ab8cdbf87a452a511f0002dd61610cd0f
parent2fa581ba910368d0f7f995fb906d6c5e4218b594
net: ks8851: Replace malloc()+memset() with calloc()

Replace combination of malloc()+memset() with calloc() as the behavior
is exactly the same and the amount of code is reduced. Moreover, remove
printf() in the fail path, as it is useless, and return proper -ENOMEM
return code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/ks8851_mll.c