On a project requirement I am trying to erase data on /dev/mtd6.

I have created mtd6 using mknod
mknod mtd c 90 0
mknod mtd0 c 90 0
mknod mtd6 c 90 12

After creating from command line I have written a .c file to erase like
INT32 DevFd;
mtd_info_t meminfo;
DevFd = open( "/dev/mtd6", O_RDWR)
ioctl(DevFd, MEMGETINFO, &meminfo )

When I am trying to execute on a mips processor I am getting error saying like

Device open failed for /dev/mtd6 with errno 6
Open: No such device or address

Can anyone help me on this.

Thanks in advance
MAdhu