UPSTREAM: drm/edid: Extract SADs properly from multiple audio data blocks
[firefly-linux-kernel-4.4.55.git] / drivers / tty / n_gsm.c
index c3fe026d3168dda14e7388472db49abf27544e4f..9aff371862461472f6f7b313a9c0338eba43723e 100644 (file)
@@ -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. */