[Devel] [PATCH] Don't give bad kprobes example aka ") < 0))" typo

Alexey Dobriyan adobriyan at openvz.org
Wed Nov 15 07:56:19 PST 2006


Signed-off-by: Alexey Dobriyan <adobriyan at openvz.org>
---

 Documentation/kprobes.txt |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -442,9 +442,10 @@ static int __init kprobe_init(void)
 	kp.fault_handler = handler_fault;
 	kp.symbol_name = "do_fork";
 
-	if ((ret = register_kprobe(&kp) < 0)) {
+	ret = register_kprobe(&kp);
+	if (ret < 0) {
 		printk("register_kprobe failed, returned %d\n", ret);
-		return -1;
+		return ret;
 	}
 	printk("kprobe registered\n");
 	return 0;




More information about the Devel mailing list