From: Sasha Levin Date: Wed, 19 Mar 2014 22:24:37 +0000 (-0400) Subject: mtd: diskonchip: mem resource name is not optional X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=86e4bbc766b9456f583f2fc3c4f6c623b422af88;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Tested-by: Alexander Shiyan Cc: # 3.14 Signed-off-by: Brian Norris --- 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) {