[PATCH 3/8] mtd: lantiq-flash: Use devm_kzalloc()

John Crispin blogic at openwrt.org
Fri Dec 20 01:03:52 EST 2013


On 20/12/13 05:58, Jingoo Han wrote:
>   err_destroy:
>   	map_destroy(ltq_mtd->mtd);
>   err_free:
> -	kfree(ltq_mtd->map);
>   err_out:
> -	kfree(ltq_mtd);
>   	return err;
>   }

Hi,

after the cleanup only err_destroy is needed. the other 2 jump marks can 
be removed aswell.

     John



More information about the linux-mtd mailing list