diff options
Diffstat (limited to 'arch/m68k/mm/kmap.c')
-rw-r--r-- | arch/m68k/mm/kmap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c index df620ac2a296..69345849454b 100644 --- a/arch/m68k/mm/kmap.c +++ b/arch/m68k/mm/kmap.c | |||
@@ -99,8 +99,7 @@ static inline void free_io_area(void *addr) | |||
99 | #endif | 99 | #endif |
100 | 100 | ||
101 | /* | 101 | /* |
102 | * Map some physical address range into the kernel address space. The | 102 | * Map some physical address range into the kernel address space. |
103 | * code is copied and adapted from map_chunk(). | ||
104 | */ | 103 | */ |
105 | /* Rewritten by Andreas Schwab to remove all races. */ | 104 | /* Rewritten by Andreas Schwab to remove all races. */ |
106 | 105 | ||
@@ -116,7 +115,7 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla | |||
116 | /* | 115 | /* |
117 | * Don't allow mappings that wrap.. | 116 | * Don't allow mappings that wrap.. |
118 | */ | 117 | */ |
119 | if (!size || size > physaddr + size) | 118 | if (!size || physaddr > (unsigned long)(-size)) |
120 | return NULL; | 119 | return NULL; |
121 | 120 | ||
122 | #ifdef CONFIG_AMIGA | 121 | #ifdef CONFIG_AMIGA |