diff options
Diffstat (limited to 'kernel/events')
-rw-r--r-- | kernel/events/uprobes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index 08ef566da763..2db1d94d7dfc 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c | |||
@@ -641,10 +641,10 @@ static int copy_insn(struct uprobe *uprobe, struct file *filp) | |||
641 | 641 | ||
642 | /* Instruction at the page-boundary; copy bytes in second page */ | 642 | /* Instruction at the page-boundary; copy bytes in second page */ |
643 | if (nbytes < bytes) { | 643 | if (nbytes < bytes) { |
644 | if (__copy_insn(mapping, filp, uprobe->arch.insn + nbytes, | 644 | int err = __copy_insn(mapping, filp, uprobe->arch.insn + nbytes, |
645 | bytes - nbytes, uprobe->offset + nbytes)) | 645 | bytes - nbytes, uprobe->offset + nbytes); |
646 | return -ENOMEM; | 646 | if (err) |
647 | 647 | return err; | |
648 | bytes = nbytes; | 648 | bytes = nbytes; |
649 | } | 649 | } |
650 | return __copy_insn(mapping, filp, uprobe->arch.insn, bytes, uprobe->offset); | 650 | return __copy_insn(mapping, filp, uprobe->arch.insn, bytes, uprobe->offset); |