author: Linus Torvalds <torvalds@linux-foundation.org> 2019-12-17 13:10:11 -0800
committer: Linus Torvalds <torvalds@linux-foundation.org> 2019-12-17 13:10:11 -0800
commit: 2d3145f8d2809592ef803a30c8a342b5a9e2de9a
parent: 58d90a04bdcc28e1b34251f4d9c1c4d39d4bba69
Commit Summary:
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/init/main.c b/init/main.c
index ec3a1463ac69..1ecfd43ed464 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1163,7 +1163,7 @@ void console_on_rootfs(void)
/* Open /dev/console in kernelspace, this should never fail */
file = filp_open("/dev/console", O_RDWR, 0);
- if (!file)
+ if (IS_ERR(file))
goto err_out;
/* create stdin/stdout/stderr, this should never fail */