summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/tty/n_gsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/tty/n_gsm.c')
-rw-r--r--kernel/drivers/tty/n_gsm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/drivers/tty/n_gsm.c b/kernel/drivers/tty/n_gsm.c
index c3fe026d3..9aff37186 100644
--- a/kernel/drivers/tty/n_gsm.c
+++ b/kernel/drivers/tty/n_gsm.c
@@ -2045,7 +2045,9 @@ static void gsm_cleanup_mux(struct gsm_mux *gsm)
}
}
spin_unlock(&gsm_mux_lock);
- WARN_ON(i == MAX_MUX);
+ /* open failed before registering => nothing to do */
+ if (i == MAX_MUX)
+ return;
/* In theory disconnecting DLCI 0 is sufficient but for some
modems this is apparently not the case. */