powerpc/kprobes: Remove redundant code
authorChristophe Leroy <christophe.leroy@c-s.fr>
Wed, 19 Feb 2020 08:05:57 +0000 (08:05 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 25 Mar 2020 01:09:08 +0000 (12:09 +1100)
commiteb4f8e259acc37b91b62ca57e0d3c8960c357843
tree2e6cf3edf430b142874ee13f1373d1fc874c4e49
parent6eeb9b3b9ce588f14a697737a30d0702b5a20293
powerpc/kprobes: Remove redundant code

At the time being we have something like

if (something) {
p = get();
if (p) {
if (something_wrong)
goto out;
...
return;
} else if (a != b) {
if (some_error)
goto out;
...
}
goto out;
}
p = get();
if (!p) {
if (a != b) {
if (some_error)
goto out;
...
}
goto out;
}

This is similar to

p = get();
if (!p) {
if (a != b) {
if (some_error)
goto out;
...
}
goto out;
}
if (something) {
if (something_wrong)
goto out;
...
return;
}

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[mpe: Reflow the comment that was moved]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/07a17425743600460ce35fa9432d42487a825583.1582099499.git.christophe.leroy@c-s.fr
arch/powerpc/kernel/kprobes.c