summaryrefslogtreecommitdiffstats
path: root/drivers/char/hvc_vio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/hvc_vio.c')
-rw-r--r--drivers/char/hvc_vio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c
index 019e0b58593..bd62dc86b47 100644
--- a/drivers/char/hvc_vio.c
+++ b/drivers/char/hvc_vio.c
@@ -153,8 +153,10 @@ static int hvc_find_vtys(void)
/* We have statically defined space for only a certain number
* of console adapters.
*/
- if (num_found >= MAX_NR_HVC_CONSOLES)
+ if (num_found >= MAX_NR_HVC_CONSOLES) {
+ of_node_put(vty);
break;
+ }
vtermno = of_get_property(vty, "reg", NULL);
if (!vtermno)