drivers/firmware/memmap.c: pass the correct argument to firmware_map_find_entry_bootmem()
authorYasuaki Ishimatsu <[email protected]>
Wed, 6 Aug 2014 23:07:00 +0000 (16:07 -0700)
committerLinus Torvalds <[email protected]>
Thu, 7 Aug 2014 01:01:19 +0000 (18:01 -0700)
firmware_map_add_hotplug() calls firmware_map_find_entry_bootmem() to
get free firmware_map_entry.  But end arguments is not correct.  So
firmware_map_find_entry_bootmem() cannot not find firmware_map_entry.

The patch passes the correct end argument to firmware_map_find_entry_bootmem().

Signed-off-by: Yasuaki Ishimatsu <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: Toshi Kani <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/firmware/memmap.c

index 17cf96c45f2b07eaeaa31f7e7bdba63b3c98f7b7..1815849f83cb5dd8540d5de6a77a118b237eba31 100644 (file)
@@ -286,7 +286,7 @@ int __meminit firmware_map_add_hotplug(u64 start, u64 end, const char *type)
 {
        struct firmware_map_entry *entry;
 
-       entry = firmware_map_find_entry_bootmem(start, end, type);
+       entry = firmware_map_find_entry_bootmem(start, end - 1, type);
        if (!entry) {
                entry = kzalloc(sizeof(struct firmware_map_entry), GFP_ATOMIC);
                if (!entry)