summaryrefslogtreecommitdiffstats
path: root/samples/hw_breakpoint/data_breakpoint.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-11-26 05:35:42 +0100
committerIngo Molnar <mingo@elte.hu>2009-11-26 09:29:21 +0100
commit605bfaee9078cd0b01d83402315389839ee4bb5c (patch)
tree35c3af269b37347b689b3b212fc99d4ae9f719e5 /samples/hw_breakpoint/data_breakpoint.c
parenthw-breakpoints: Improve in-kernel event creation error granularity (diff)
downloadlinux-605bfaee9078cd0b01d83402315389839ee4bb5c.tar.xz
linux-605bfaee9078cd0b01d83402315389839ee4bb5c.zip
hw-breakpoints: Simplify error handling in breakpoint creation requests
This simplifies the error handling when we create a breakpoint. We don't need to check the NULL return value corner case anymore since we have improved perf_event_create_kernel_counter() to always return an error code in the failure case. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Prasad <prasad@linux.vnet.ibm.com> LKML-Reference: <1259210142-5714-3-git-send-regression-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'samples/hw_breakpoint/data_breakpoint.c')
-rw-r--r--samples/hw_breakpoint/data_breakpoint.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/samples/hw_breakpoint/data_breakpoint.c b/samples/hw_breakpoint/data_breakpoint.c
index 95063818bcf4..ee7f9fbaffbd 100644
--- a/samples/hw_breakpoint/data_breakpoint.c
+++ b/samples/hw_breakpoint/data_breakpoint.c
@@ -61,9 +61,6 @@ static int __init hw_break_module_init(void)
if (IS_ERR(sample_hbp)) {
ret = PTR_ERR(sample_hbp);
goto fail;
- } else if (!sample_hbp) {
- ret = -EINVAL;
- goto fail;
}
printk(KERN_INFO "HW Breakpoint for %s write installed\n", ksym_name);