mtd: diskonchip: mem resource name is not optional
authorSasha Levin <sasha.levin@oracle.com>
Wed, 19 Mar 2014 22:24:37 +0000 (18:24 -0400)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 1 Apr 2014 01:43:22 +0000 (18:43 -0700)
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>
drivers/mtd/nand/diskonchip.c

index b9b4db607850c1accfca990685d92c473b008da4..f68a7bccecdc65878fac3ed3056ac499099992b7 100644 (file)
@@ -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) {