提交 6496a5c9 编写于 作者: V Vasiliy Kulikov 提交者: Chris Metcalf

char: hvc: check for error case

hvc_alloc() may fail, if so exit from init() with error.
Signed-off-by: NVasiliy Kulikov <segooon@gmail.com>
Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
上级 77d23303
......@@ -61,7 +61,8 @@ console_initcall(hvc_tile_console_init);
static int __init hvc_tile_init(void)
{
hvc_alloc(0, 0, &hvc_tile_get_put_ops, 128);
return 0;
struct hvc_struct *s;
s = hvc_alloc(0, 0, &hvc_tile_get_put_ops, 128);
return IS_ERR(s) ? PTR_ERR(s) : 0;
}
device_initcall(hvc_tile_init);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册