From d79d7665c1cd0692949025a29846cd9a2e48a4a6 Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Wed, 22 Jun 2011 16:24:08 +0200 Subject: [PATCH] --- yaml --- r: 254053 b: refs/heads/master c: b530ce7a1af5a9355be518557d86b33c6d2cf088 h: refs/heads/master i: 254051: dafdfc7393930ecbe5c37fe0c80815c46b9cab58 v: v3 --- [refs] | 2 +- trunk/arch/s390/oprofile/init.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2c555fc2588a..aeb50f986137 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 80629b0b0fd5ca868dc8eced28e6101e39ac2ef6 +refs/heads/master: b530ce7a1af5a9355be518557d86b33c6d2cf088 diff --git a/trunk/arch/s390/oprofile/init.c b/trunk/arch/s390/oprofile/init.c index 5995e9bc72d9..5e2ab03eaffd 100644 --- a/trunk/arch/s390/oprofile/init.c +++ b/trunk/arch/s390/oprofile/init.c @@ -151,6 +151,12 @@ static int oprofile_hwsampler_init(struct oprofile_operations *ops) if (oprofile_max_interval == 0) return -ENODEV; + /* The initial value should be sane */ + if (oprofile_hw_interval < oprofile_min_interval) + oprofile_hw_interval = oprofile_min_interval; + if (oprofile_hw_interval > oprofile_max_interval) + oprofile_hw_interval = oprofile_max_interval; + if (oprofile_timer_init(ops)) return -ENODEV;