From: Oleg Nesterov Date: Sun, 24 Mar 2013 17:45:44 +0000 (+0100) Subject: uprobes: Kill the unnecesary filp != NULL check in __copy_insn() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=98763a1bb1515f8a8d7f1d9ae42604e19872364b;p=openwrt%2Fstaging%2Fblogic.git uprobes: Kill the unnecesary filp != NULL check in __copy_insn() __copy_insn(filp) can only be called after valid_vma() returns T, vma->vm_file passed as "filp" can not be NULL. Signed-off-by: Oleg Nesterov Acked-by: Anton Arapov Acked-by: Srikar Dronamraju --- diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index ba6acfe7c0de..093866547fe3 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c @@ -501,9 +501,6 @@ __copy_insn(struct address_space *mapping, struct file *filp, char *insn, { struct page *page; - if (!filp) - return -EINVAL; - if (!mapping->a_ops->readpage) return -EIO; /*