summaryrefslogtreecommitdiffstats
path: root/net/netconsole.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netconsole.c')
-rw-r--r--net/netconsole.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/netconsole.c b/net/netconsole.c
index 2ab19de4d5..86a68e19d9 100644
--- a/net/netconsole.c
+++ b/net/netconsole.c
@@ -81,6 +81,9 @@ static int nc_getc(struct console_device *cdev)
struct nc_priv, cdev);
unsigned char c;
+ if (!priv->con)
+ return 0;
+
while (!kfifo_len(priv->fifo))
net_poll();
@@ -94,6 +97,9 @@ static int nc_tstc(struct console_device *cdev)
struct nc_priv *priv = container_of(cdev,
struct nc_priv, cdev);
+ if (!priv->con)
+ return 0;
+
if (priv->busy)
return kfifo_len(priv->fifo) ? 1 : 0;