diff mbox

[v4,18/53] xen/arch/x86/oprofile/nmi_int.c: let custom parameter parsing routines return errno

Message ID 20170823173446.24801-19-jgross@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Juergen Gross Aug. 23, 2017, 5:34 p.m. UTC
Modify the custom parameter parsing routines in:

xen/arch/x86/oprofile/nmi_int.c

to indicate whether the parameter value was parsed successfully.

Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/oprofile/nmi_int.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/xen/arch/x86/oprofile/nmi_int.c b/xen/arch/x86/oprofile/nmi_int.c
index 126f7a8d9f..84ba108fdb 100644
--- a/xen/arch/x86/oprofile/nmi_int.c
+++ b/xen/arch/x86/oprofile/nmi_int.c
@@ -323,12 +323,15 @@  static int __init p4_init(char ** cpu_type)
 
 
 static int force_arch_perfmon;
+
 static int force_cpu_type(const char *str)
 {
 	if (!strcmp(str, "arch_perfmon")) {
 		force_arch_perfmon = 1;
 		printk(KERN_INFO "oprofile: forcing architectural perfmon\n");
 	}
+	else
+		return -EINVAL;
 
 	return 0;
 }