All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: diskonchip: mem resource name is not optional
@ 2014-03-19 22:24 ` Sasha Levin
  0 siblings, 0 replies; 8+ messages in thread
From: Sasha Levin @ 2014-03-19 22:24 UTC (permalink / raw)
  To: shc_work, computersforpeace; +Cc: Sasha Levin, linux-mtd, linux-kernel

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>
---
 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 b9b4db6..f68a7bc 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) {
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-04-01  1:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-19 22:24 [PATCH] mtd: diskonchip: mem resource name is not optional Sasha Levin
2014-03-19 22:24 ` Sasha Levin
2014-03-22  8:39 ` Alexander Shiyan
2014-03-22  8:39   ` Alexander Shiyan
2014-03-30  0:31   ` Sasha Levin
2014-03-30  0:31     ` Sasha Levin
2014-04-01  1:46     ` Brian Norris
2014-04-01  1:46       ` Brian Norris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.