diff -urN linux-2.4.19/drivers/mtd/chips/cfi_cmdset_0001.c linux.orig/drivers/mtd/chips/cfi_cmdset_0001.c --- linux-2.4.19/drivers/mtd/chips/cfi_cmdset_0001.c Mon Sep 30 09:50:46 2002 +++ linux.orig/drivers/mtd/chips/cfi_cmdset_0001.c Mon Sep 30 10:04:06 2002 @@ -300,6 +300,8 @@ */ switch (chip->state) { case FL_ERASING: + if (!((struct cfi_pri_intelext *)cfi->cmdset_priv)) + goto sleep; /* Must be in Jedec Mode so assume sleep */ if (!(((struct cfi_pri_intelext *)cfi->cmdset_priv)->FeatureSupport & 2)) goto sleep; /* We don't support erase suspend */ @@ -543,6 +545,14 @@ struct cfi_private *cfi = map->fldrv_priv; struct cfi_pri_intelext *extp=cfi->cmdset_priv; int base_offst,reg_sz; + + if(!extp) + { + printk(KERN_WARNING + "%s: This flash devive is a Jedec Flash so no protection data to read!\n" + ,map->name); + return 0; + } /* Check that we actually have some protection registers */ if(!(extp->FeatureSupport&64)){