diff options
author | Vasiliy Kulikov <segooon@gmail.com> | 2010-09-12 22:57:14 +0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-10-14 14:48:12 -0400 |
commit | 6496a5c9e7ccc4e2ec34c09d04a819f8fdc29981 (patch) | |
tree | 9a1bda315e00404b142f6b1e3fcf915bf67fdfb5 /drivers/char/hvc_tile.c | |
parent | 77d233036ea886398770f208aa22235acf0d011c (diff) |
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>
Diffstat (limited to 'drivers/char/hvc_tile.c')
-rw-r--r-- | drivers/char/hvc_tile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/hvc_tile.c b/drivers/char/hvc_tile.c index c4efb55cbc0..7a84a059547 100644 --- a/drivers/char/hvc_tile.c +++ b/drivers/char/hvc_tile.c @@ -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); |