diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-07-20 16:42:59 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-07-20 16:42:59 +0900 |
commit | 9ff561fdf73493d757bbc74aa58627e1381650fb (patch) | |
tree | 4484d230662126b1ac94ea545ca5429c91e0a68b /lib/fault-inject.c | |
parent | 7b98cf0cf4e8798b9e7435f966ed0d90a2a925de (diff) | |
parent | fdd85ec3eb8cc1b663678a3efa16ee59a32e0277 (diff) | |
download | linux-3.10-9ff561fdf73493d757bbc74aa58627e1381650fb.tar.gz linux-3.10-9ff561fdf73493d757bbc74aa58627e1381650fb.tar.bz2 linux-3.10-9ff561fdf73493d757bbc74aa58627e1381650fb.zip |
Merge branch 'common/pinctrl' into sh-latest
Diffstat (limited to 'lib/fault-inject.c')
-rw-r--r-- | lib/fault-inject.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/fault-inject.c b/lib/fault-inject.c index 6805453c18e..f7210ad6cff 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c @@ -101,6 +101,10 @@ static inline bool fail_stacktrace(struct fault_attr *attr) bool should_fail(struct fault_attr *attr, ssize_t size) { + /* No need to check any other properties if the probability is 0 */ + if (attr->probability == 0) + return false; + if (attr->task_filter && !fail_task(attr, current)) return false; |