After reading the slram sources I found two things. First of all the memset(mymtd, 0, sizeof(*mymtd)); In my opinion this is not neccesary because this is done two lines below this one. The next thing I found is the memset(mymtd->priv, 0, sizeof(struct mypriv)); If the allocation of the priv field failed above mymtd is set to NULL. If the priv-field is accessed I guess this would lead to a segmentation fault. Attached to this mail I send a patch to cover both this issues. I hope this may be helpfull in some way. jochen