mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
m68k: Allow ioremapping top of memory
The test in __ioremap to reject memory ranges crossing the 0 boundary rejects also memory ranges ending at the end of the memory. Fix that. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
parent
145452649d
commit
88cb773c5f
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla
|
|||
/*
|
||||
* Don't allow mappings that wrap..
|
||||
*/
|
||||
if (!size || size > physaddr + size)
|
||||
if (!size || physaddr > (unsigned long)(-size))
|
||||
return NULL;
|
||||
|
||||
#ifdef CONFIG_AMIGA
|
||||
|
|
Loading…
Reference in a new issue