.. | .. |
---|
278 | 278 | enum direction dir) |
---|
279 | 279 | { |
---|
280 | 280 | unsigned int reg; |
---|
281 | | - int check = (dir == load) ? VERIFY_READ : VERIFY_WRITE; |
---|
282 | 281 | int size = ((insn >> 19) & 3) == 3 ? 8 : 4; |
---|
283 | 282 | |
---|
284 | 283 | if ((regs->pc | regs->npc) & 3) |
---|
.. | .. |
---|
290 | 289 | |
---|
291 | 290 | reg = (insn >> 25) & 0x1f; |
---|
292 | 291 | if (reg >= 16) { |
---|
293 | | - if (!access_ok(check, WINREG_ADDR(reg - 16), size)) |
---|
| 292 | + if (!access_ok(WINREG_ADDR(reg - 16), size)) |
---|
294 | 293 | return -EFAULT; |
---|
295 | 294 | } |
---|
296 | 295 | reg = (insn >> 14) & 0x1f; |
---|
297 | 296 | if (reg >= 16) { |
---|
298 | | - if (!access_ok(check, WINREG_ADDR(reg - 16), size)) |
---|
| 297 | + if (!access_ok(WINREG_ADDR(reg - 16), size)) |
---|
299 | 298 | return -EFAULT; |
---|
300 | 299 | } |
---|
301 | 300 | if (!(insn & 0x2000)) { |
---|
302 | 301 | reg = (insn & 0x1f); |
---|
303 | 302 | if (reg >= 16) { |
---|
304 | | - if (!access_ok(check, WINREG_ADDR(reg - 16), size)) |
---|
| 303 | + if (!access_ok(WINREG_ADDR(reg - 16), size)) |
---|
305 | 304 | return -EFAULT; |
---|
306 | 305 | } |
---|
307 | 306 | } |
---|