hw-breakpoints: Handle bad modify_user_hw_breakpoint off-case return value
authorFrederic Weisbecker <fweisbec@gmail.com>
Fri, 11 Dec 2009 10:58:42 +0000 (11:58 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 11 Dec 2009 11:03:53 +0000 (12:03 +0100)
While converting modify_user_hw_breakpoint() return value, we
forgot to handle the off-case. It's not returning a pointer
anymore.

This solves the build warning reported by Stephen Rothwell against
linux-next.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Prasad <prasad@linux.vnet.ibm.com>
LKML-Reference: <1260529122-6260-1-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Prasad <prasad@linux.vnet.ibm.com>
include/linux/hw_breakpoint.h

index 69f07a9f1277bceb76fddc3b4ff2d223b6787368..41235c93e4e95400bf0db52bf2f7b84399d22a39 100644 (file)
@@ -93,7 +93,7 @@ register_user_hw_breakpoint(struct perf_event_attr *attr,
                            struct task_struct *tsk)    { return NULL; }
 static inline int
 modify_user_hw_breakpoint(struct perf_event *bp,
-                         struct perf_event_attr *attr) { return NULL; }
+                         struct perf_event_attr *attr) { return -ENOSYS; }
 static inline struct perf_event *
 register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr,
                                perf_overflow_handler_t  triggered,