Commit 3c4b66a6 authored by Markus Elfring's avatar Markus Elfring Committed by Michael Ellerman

powerpc/sstep: Return directly after a failed address_ok() in emulate_step()

Setting err and going to ldst_done just returns 0, without using err, so
just return 0 directly. We already do that for other call sites in this
function.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
[mpe: Rewrite change log]
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 8b257783
...@@ -1803,9 +1803,8 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) ...@@ -1803,9 +1803,8 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
return 0; return 0;
if (op.ea & (size - 1)) if (op.ea & (size - 1))
break; /* can't handle misaligned */ break; /* can't handle misaligned */
err = -EFAULT;
if (!address_ok(regs, op.ea, size)) if (!address_ok(regs, op.ea, size))
goto ldst_done; return 0;
err = 0; err = 0;
switch (size) { switch (size) {
case 4: case 4:
...@@ -1828,9 +1827,8 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) ...@@ -1828,9 +1827,8 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
return 0; return 0;
if (op.ea & (size - 1)) if (op.ea & (size - 1))
break; /* can't handle misaligned */ break; /* can't handle misaligned */
err = -EFAULT;
if (!address_ok(regs, op.ea, size)) if (!address_ok(regs, op.ea, size))
goto ldst_done; return 0;
err = 0; err = 0;
switch (size) { switch (size) {
case 4: case 4:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment