Skip to content

Commit ccf5af2

Browse files
Andreas Bießmanngregkh
authored andcommitted
mtd: omap2: fix module loading
commit 4d3d688 upstream. Unloading the omap2 nand driver missed to release the memory region which will result in not being able to request it again if one want to load the driver later on. This patch fixes following error when loading omap2 module after unloading: ---8<--- ~ $ rmmod omap2 ~ $ modprobe omap2 [ 37.420928] omap2-nand: probe of omap2-nand.0 failed with error -16 ~ $ --->8--- This error was introduced in 67ce04b which was the first commit of this driver. Signed-off-by: Andreas Bießmann <andreas@biessmann.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ee9be6a commit ccf5af2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/mtd/nand/omap2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,6 +1387,7 @@ static int omap_nand_remove(struct platform_device *pdev)
13871387
/* Release NAND device, its internal structures and partitions */
13881388
nand_release(&info->mtd);
13891389
iounmap(info->nand.IO_ADDR_R);
1390+
release_mem_region(info->phys_base, NAND_IO_SIZE);
13901391
kfree(info);
13911392
return 0;
13921393
}

0 commit comments

Comments
 (0)