summaryrefslogtreecommitdiff
path: root/kernel/fail_function.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@kernel.org>2020-12-07 07:57:42 +0100
committerWolfram Sang <wsa@kernel.org>2020-12-07 07:57:42 +0100
commit1e04538c751bfc572bfa9995996c7f4af098a625 (patch)
tree40aa603803f857af4a5a5f25f81b6fb31b8e0152 /kernel/fail_function.c
parent5e9a97b1f4491b8b65874901ad084348fcaba327 (diff)
parent0477e92881850d44910a7e94fc2c46f96faa131f (diff)
Merge branch 'i2c/for-current' into i2c/for-5.11
Diffstat (limited to 'kernel/fail_function.c')
-rw-r--r--kernel/fail_function.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/fail_function.c b/kernel/fail_function.c
index 63b349168da7..b0b1ad93fa95 100644
--- a/kernel/fail_function.c
+++ b/kernel/fail_function.c
@@ -253,7 +253,7 @@ static ssize_t fei_write(struct file *file, const char __user *buffer,
if (copy_from_user(buf, buffer, count)) {
ret = -EFAULT;
- goto out;
+ goto out_free;
}
buf[count] = '\0';
sym = strstrip(buf);
@@ -307,8 +307,9 @@ static ssize_t fei_write(struct file *file, const char __user *buffer,
ret = count;
}
out:
- kfree(buf);
mutex_unlock(&fei_lock);
+out_free:
+ kfree(buf);
return ret;
}