Skip to content

Commit 48725bb

Browse files
Xiu Jianfengakpm00
authored andcommitted
mm/mprotect: remove the redundant initialization for error
The variable error will be assigned correctly before it is used, the initialization is redundant, so remove it. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Xiu Jianfeng <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent e75858b commit 48725bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/mprotect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ static int do_mprotect_pkey(unsigned long start, size_t len,
663663
{
664664
unsigned long nstart, end, tmp, reqprot;
665665
struct vm_area_struct *vma, *prev;
666-
int error = -EINVAL;
666+
int error;
667667
const int grows = prot & (PROT_GROWSDOWN|PROT_GROWSUP);
668668
const bool rier = (current->personality & READ_IMPLIES_EXEC) &&
669669
(prot & PROT_READ);

0 commit comments

Comments
 (0)