Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb4f9988 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven
Browse files

m68k/amiga: Chip RAM - Use resource_size() to fix off-by-one error

parent cab49bc9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ void amiga_chip_free(void *ptr)
		if (res->start != start)
			continue;
		*p = res->sibling;
		size = res->end-start;
		size = resource_size(res);
		pr_debug("amiga_chip_free: free %lu bytes at %p\n", size, ptr);
		atomic_add(size, &chipavail);
		kfree(res);