hw-breakpoints: Simplify error handling in breakpoint creation requests
[deliverable/linux.git] / arch / x86 / kernel / ptrace.c
index b25f8947ed7aefd4e885d0820daaf764bb19545b..75e0cd847bd6b20bf8d99a9de3edbdbd92c191b6 100644 (file)
@@ -657,10 +657,7 @@ restore:
                                               tsk, true);
                thread->ptrace_bps[i] = NULL;
 
-               if (!bp) { /* incorrect bp, or we have a bug in bp API */
-                       rc = -EINVAL;
-                       break;
-               }
+               /* Incorrect bp, or we have a bug in bp API */
                if (IS_ERR(bp)) {
                        rc = PTR_ERR(bp);
                        bp = NULL;
@@ -729,9 +726,6 @@ static int ptrace_set_breakpoint_addr(struct task_struct *tsk, int nr,
                                               tsk,
                                               bp->attr.disabled);
        }
-
-       if (!bp)
-               return -EIO;
        /*
         * CHECKME: the previous code returned -EIO if the addr wasn't a
         * valid task virtual addr. The new one will return -EINVAL in this
This page took 0.02874 seconds and 5 git commands to generate.