mtd: diskonchip: mem resource name is not optional
commit 86e4bbc766
upstream.
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>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4893808f71
commit
81cb54ac10
|
@ -1438,7 +1438,7 @@ static int __init doc_probe(unsigned long physadr)
|
||||||
int reg, len, numchips;
|
int reg, len, numchips;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (!request_mem_region(physadr, DOC_IOREMAP_LEN, NULL))
|
if (!request_mem_region(physadr, DOC_IOREMAP_LEN, "DiskOnChip"))
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
virtadr = ioremap(physadr, DOC_IOREMAP_LEN);
|
virtadr = ioremap(physadr, DOC_IOREMAP_LEN);
|
||||||
if (!virtadr) {
|
if (!virtadr) {
|
||||||
|
|
Loading…
Reference in New Issue