Commit df66e7167ac756baf14d2b8ea7a2cfa056600a93 is adding support for multiple resources in physmap. On shutdown/supend/resume, it's suspending all resources by calling mtd[]->suspend() without checking the mtd[] is not null. This makes oopsing my kernel. Signed-off-by: Arnaud Patard --- arch/arm/mach-iop32x/em7210.c | 10 6 + 4 - 0 ! drivers/mtd/maps/physmap.c | 8 5 + 3 - 0 ! 2 files changed, 11 insertions(+), 7 deletions(-) Index: linux-2.6/drivers/mtd/maps/physmap.c =================================================================== --- linux-2.6.orig/drivers/mtd/maps/physmap.c 2008-03-02 15:37:20.000000000 +0100 +++ linux-2.6/drivers/mtd/maps/physmap.c 2008-03-02 15:43:18.000000000 +0100 @@ -204,7 +204,8 @@ static int physmap_flash_suspend(struct if (info) for (i = 0; i < MAX_RESOURCES; i++) - ret |= info->mtd[i]->suspend(info->mtd[i]); + if (info && info->mtd[i]) + ret |= info->mtd[i]->suspend(info->mtd[i]); return ret; } @@ -216,7 +217,8 @@ static int physmap_flash_resume(struct p if (info) for (i = 0; i < MAX_RESOURCES; i++) - info->mtd[i]->resume(info->mtd[i]); + if (info && info->mtd[i]) + info->mtd[i]->resume(info->mtd[i]); return 0; } @@ -226,7 +228,7 @@ static void physmap_flash_shutdown(struc int i; for (i = 0; i < MAX_RESOURCES; i++) - if (info && info->mtd[i]->suspend(info->mtd[i]) == 0) + if (info && info->mtd[i] && info->mtd[i]->suspend(info->mtd[i]) == 0) info->mtd[i]->resume(info->mtd[i]); } #else