projects
/
platform
/
kernel
/
linux-tizen-modules-source.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dab1fe9
)
logger: handle error values from filp_open()
author
Łukasz Stelmach
<l.stelmach@samsung.com>
Fri, 10 Sep 2021 18:02:53 +0000
(20:02 +0200)
committer
Łukasz Stelmach
<l.stelmach@samsung.com>
Thu, 16 Sep 2021 20:34:51 +0000
(22:34 +0200)
filp_open() may return -errno, so check for that instead of checking
for NULL.
Change-Id: I5a694555bcd082506330e08f48ed4b7043c4e120
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
kernel/logger.c
patch
|
blob
|
history
diff --git
a/kernel/logger.c
b/kernel/logger.c
index
202703c
..
eb287e4
100644
(file)
--- a/
kernel/logger.c
+++ b/
kernel/logger.c
@@
-484,9
+484,8
@@
static struct file *make_new_file(struct file *file)
nfile = filp_open(p, O_WRONLY, 0);
kfree(pbuf);
- if (!nfile) {
- return ERR_PTR(-EFAULT);
- }
+ if (IS_ERR(nfile))
+ return nfile;
nwriter = nfile->private_data;
nwriter->prio = writer->prio;