summaryrefslogtreecommitdiff
path: root/lib/fault-inject.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-07-20 16:42:59 +0900
committerPaul Mundt <lethal@linux-sh.org>2012-07-20 16:42:59 +0900
commit9ff561fdf73493d757bbc74aa58627e1381650fb (patch)
tree4484d230662126b1ac94ea545ca5429c91e0a68b /lib/fault-inject.c
parent7b98cf0cf4e8798b9e7435f966ed0d90a2a925de (diff)
parentfdd85ec3eb8cc1b663678a3efa16ee59a32e0277 (diff)
downloadlinux-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.c4
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;