treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / um / kernel / early_printk.c
blobc350c2331bbe9fb1ab7871aea820e31c383853f5
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Copyright (C) 2011 Richard Weinberger <richrd@nod.at>
4 */
6 #include <linux/kernel.h>
7 #include <linux/console.h>
8 #include <linux/init.h>
9 #include <os.h>
11 static void early_console_write(struct console *con, const char *s, unsigned int n)
13 um_early_printk(s, n);
16 static struct console early_console_dev = {
17 .name = "earlycon",
18 .write = early_console_write,
19 .flags = CON_BOOT,
20 .index = -1,
23 static int __init setup_early_printk(char *buf)
25 if (!early_console) {
26 early_console = &early_console_dev;
27 register_console(&early_console_dev);
29 return 0;
32 early_param("earlyprintk", setup_early_printk);