X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fstaging%2Fdgrp%2Fdgrp_tty.c;h=e125b03598d73e5b40815cad70887793162802c5;hb=1dc506a551273b6d7638a09036188554f564d5ec;hp=7d7de873870c68d6b0965a5fbc51784963836388;hpb=940e3a8dd6683a3787faf769b3df7a06f1c2fa31;p=~andy%2Flinux diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers/staging/dgrp/dgrp_tty.c index 7d7de873870..e125b03598d 100644 --- a/drivers/staging/dgrp/dgrp_tty.c +++ b/drivers/staging/dgrp/dgrp_tty.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "dgrp_common.h" @@ -3172,6 +3173,9 @@ dgrp_tty_init(struct nd_struct *nd) */ nd->nd_serial_ttdriver = alloc_tty_driver(CHAN_MAX); + if (!nd->nd_serial_ttdriver) + return -ENOMEM; + sprintf(nd->nd_serial_name, "tty_dgrp_%s_", id); nd->nd_serial_ttdriver->owner = THIS_MODULE; @@ -3231,6 +3235,9 @@ dgrp_tty_init(struct nd_struct *nd) } nd->nd_callout_ttdriver = alloc_tty_driver(CHAN_MAX); + if (!nd->nd_callout_ttdriver) + return -ENOMEM; + sprintf(nd->nd_callout_name, "cu_dgrp_%s_", id); nd->nd_callout_ttdriver->owner = THIS_MODULE; @@ -3268,6 +3275,9 @@ dgrp_tty_init(struct nd_struct *nd) nd->nd_xprint_ttdriver = alloc_tty_driver(CHAN_MAX); + if (!nd->nd_xprint_ttdriver) + return -ENOMEM; + sprintf(nd->nd_xprint_name, "pr_dgrp_%s_", id); nd->nd_xprint_ttdriver->owner = THIS_MODULE;