Merge tag 'perf-core-for-mingo-4.20-20180905' of git://git.kernel.org/pub/scm/linux...
[muen/linux.git] / kernel / events / core.c
index 2a62b96600ad91dede076a2dc8ad4e7fc16afe09..abaed4f8bb7f227bafdbc26b465df060a765eaf3 100644 (file)
@@ -2867,16 +2867,11 @@ static int perf_event_modify_breakpoint(struct perf_event *bp,
        _perf_event_disable(bp);
 
        err = modify_user_hw_breakpoint_check(bp, attr, true);
-       if (err) {
-               if (!bp->attr.disabled)
-                       _perf_event_enable(bp);
 
-               return err;
-       }
-
-       if (!attr->disabled)
+       if (!bp->attr.disabled)
                _perf_event_enable(bp);
-       return 0;
+
+       return err;
 }
 
 static int perf_event_modify_attr(struct perf_event *event,