diff options
author | Sasha Levin <sasha.levin@oracle.com> | 2014-03-19 18:24:37 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-03-31 18:43:22 -0700 |
commit | 86e4bbc766b9456f583f2fc3c4f6c623b422af88 (patch) | |
tree | 858f90e51c1b3559c9c2e2f295a26e1002722bc4 /drivers/mtd | |
parent | 148256fa0bb8e05a00db3f204b36e19e6312102c (diff) | |
download | linux-86e4bbc766b9456f583f2fc3c4f6c623b422af88.tar.bz2 |
mtd: diskonchip: mem resource name is not optional
Passing a name to request_mem_region() isn't optional and can't just
be NULL. Passing NULL causes a NULL ptr deref later in the boot
process.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Tested-by: Alexander Shiyan <shc_work@mail.ru>
Cc: <stable@vger.kernel.org> # 3.14
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/diskonchip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index b9b4db607850..f68a7bccecdc 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c @@ -1439,7 +1439,7 @@ static int __init doc_probe(unsigned long physadr) int reg, len, numchips; int ret = 0; - if (!request_mem_region(physadr, DOC_IOREMAP_LEN, NULL)) + if (!request_mem_region(physadr, DOC_IOREMAP_LEN, "DiskOnChip")) return -EBUSY; virtadr = ioremap(physadr, DOC_IOREMAP_LEN); if (!virtadr) { |