net: sctp: rework debugging framework to use pr_debug and friends
[firefly-linux-kernel-4.4.55.git] / net / sctp / endpointola.c
index b26999d508ba636e9bc0e98bec8d5732d0fac773..9e3d257de0e0814274cf852ae883835bb4c72eac 100644 (file)
@@ -249,7 +249,10 @@ static void sctp_endpoint_destroy(struct sctp_endpoint *ep)
 {
        struct sock *sk;
 
-       SCTP_ASSERT(ep->base.dead, "Endpoint is not dead", return);
+       if (unlikely(!ep->base.dead)) {
+               WARN(1, "Attempt to destroy undead endpoint %p!\n", ep);
+               return;
+       }
 
        /* Free the digest buffer */
        kfree(ep->digest);