[PATCH][nandsim]Fix RAM wasting via kmalloc (take 2)

Artem Bityutskiy dedekind at infradead.org
Sat Nov 1 05:35:52 EDT 2008


On Wed, 2008-10-29 at 13:14 +0000, Alexey Korolev wrote:
> @@ -437,6 +440,8 @@ static int alloc_device(struct nandsim *ns)
>  	for (i = 0; i < ns->geom.pgnum; i++) {
>  		ns->pages[i].byte = NULL;
>  	}
> +	ns->nand_pages_slab = kmem_cache_create("nandsim",
> +						ns->geom.pgszoob, 0, 0, NULL);

Sorry, but how about checking for errors here?

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list