+ int result;
+ result = marker_set_probe("subsys_mark1", DO_MARK1_FORMAT,
+ (marker_probe_func*)do_mark1);
+ if(!result) goto end;
+ result = marker_set_probe("subsys_mark2", NULL,
+ (marker_probe_func*)do_mark2);
+ if(!result) goto cleanup1;
+ result = marker_set_probe("subsys_mark3", DO_MARK3_FORMAT,
+ (marker_probe_func*)do_mark3);
+ if(!result) goto cleanup2;
+
+ return 0;
+
+cleanup2:
+ marker_remove_probe((marker_probe_func*)do_mark2);
+cleanup1:
+ marker_remove_probe((marker_probe_func*)do_mark1);
+end:
+ return -EPERM;