diff options
author | Tony Lindgren <tony@atomide.com> | 2020-12-18 10:15:12 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2020-12-18 10:15:12 +0300 |
commit | 500050f0d28868af302a3c24d7d1d0191521286e (patch) | |
tree | 7c4366836fcf5c7d7be4292f60d76876b3c463a0 /kernel/fail_function.c | |
parent | c0bc969c176b10598b31d5d1a5edf9a5261f0a9f (diff) | |
parent | 6efac0173cd15460b48c91e1b0a000379f341f00 (diff) | |
download | linux-500050f0d28868af302a3c24d7d1d0191521286e.tar.xz |
Merge branch 'fixes-omap3' into fixes
Diffstat (limited to 'kernel/fail_function.c')
-rw-r--r-- | kernel/fail_function.c | 5 |
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; } |