diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-14 14:46:59 -0700 | 
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-14 14:46:59 -0700 | 
| commit | cf0a1579dda4423c43f584a6bf029f033cf1e663 (patch) | |
| tree | 089de37c7cc13f9f21ce630737ff3d288e52947f /lib/fault-inject.c | |
| parent | 8a5a90a2a477b86a3dc2eaa5a706db9bfdd647ca (diff) | |
| parent | ef954844c7ace62f773f4f23e28d2d915adc419f (diff) | |
Merge 4.13-rc5 into tty-next
We want the fixes in here, and we resolve the merge issue in the
8250_core.c file.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/fault-inject.c')
| -rw-r--r-- | lib/fault-inject.c | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/fault-inject.c b/lib/fault-inject.c index 7d315fdb9f13..cf7b129b0b2b 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c @@ -110,10 +110,12 @@ bool should_fail(struct fault_attr *attr, ssize_t size)  	if (in_task()) {  		unsigned int fail_nth = READ_ONCE(current->fail_nth); -		if (fail_nth && !WRITE_ONCE(current->fail_nth, fail_nth - 1)) -			goto fail; +		if (fail_nth) { +			if (!WRITE_ONCE(current->fail_nth, fail_nth - 1)) +				goto fail; -		return false; +			return false; +		}  	}  	/* No need to check any other properties if the probability is 0 */  | 
