char: hvc: check for error case
hvc_alloc() may fail, if so exit from init() with error. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
This commit is contained in:
parent
77d233036e
commit
6496a5c9e7
@ -61,7 +61,8 @@ console_initcall(hvc_tile_console_init);
|
|||||||
|
|
||||||
static int __init hvc_tile_init(void)
|
static int __init hvc_tile_init(void)
|
||||||
{
|
{
|
||||||
hvc_alloc(0, 0, &hvc_tile_get_put_ops, 128);
|
struct hvc_struct *s;
|
||||||
return 0;
|
s = hvc_alloc(0, 0, &hvc_tile_get_put_ops, 128);
|
||||||
|
return IS_ERR(s) ? PTR_ERR(s) : 0;
|
||||||
}
|
}
|
||||||
device_initcall(hvc_tile_init);
|
device_initcall(hvc_tile_init);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user