Skip to content

Commit 9dd88f3

Browse files
committed
coredump: avoid pointless variable
we don't use that value at all so don't bother with it in the first place. Link: https://lore.kernel.org/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent ae20958 commit 9dd88f3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

fs/coredump.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,6 @@ void vfs_coredump(const kernel_siginfo_t *siginfo)
10881088
struct mm_struct *mm = current->mm;
10891089
struct linux_binfmt * binfmt;
10901090
const struct cred *old_cred;
1091-
int retval = 0;
10921091
int argc = 0;
10931092
struct coredump_params cprm = {
10941093
.siginfo = siginfo,
@@ -1123,8 +1122,7 @@ void vfs_coredump(const kernel_siginfo_t *siginfo)
11231122
if (coredump_force_suid_safe(&cprm))
11241123
cred->fsuid = GLOBAL_ROOT_UID;
11251124

1126-
retval = coredump_wait(siginfo->si_signo, &core_state);
1127-
if (retval < 0)
1125+
if (coredump_wait(siginfo->si_signo, &core_state) < 0)
11281126
return;
11291127

11301128
old_cred = override_creds(cred);
@@ -1160,8 +1158,7 @@ void vfs_coredump(const kernel_siginfo_t *siginfo)
11601158

11611159
/* get us an unshared descriptor table; almost always a no-op */
11621160
/* The cell spufs coredump code reads the file descriptor tables */
1163-
retval = unshare_files();
1164-
if (retval)
1161+
if (unshare_files())
11651162
goto close_fail;
11661163

11671164
if ((cn.mask & COREDUMP_KERNEL) && !coredump_write(&cn, &cprm, binfmt))

0 commit comments

Comments
 (0)