summaryrefslogtreecommitdiffstats
path: root/kernel/fail_function.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-23 08:21:37 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-23 08:21:37 +0100
commit03c1136af504bbc2cabda76af6b27fd5f7cf8a7d (patch)
tree6c53a0f635b4339571050006191a950e3f5db93c /kernel/fail_function.c
parent0d79a48440f559ac939d1be2089757c5e4ab16c7 (diff)
parent418baf2c28f3473039f2f7377760bd8f6897ae18 (diff)
downloadcachepc-linux-03c1136af504bbc2cabda76af6b27fd5f7cf8a7d.tar.gz
cachepc-linux-03c1136af504bbc2cabda76af6b27fd5f7cf8a7d.zip
Merge 5.10-rc5 into staging-testing
We want the staging/IIO fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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;
}