mtd: lantiq-flash: Use devm_kzalloc()

Use devm_kzalloc() to make cleanup paths simpler. Also, checking
return value of devm_kzalloc() is added in order to check if the
allocation succeded.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
1 file changed