From: Daniel Borkmann Date: Tue, 16 Apr 2013 11:07:11 +0000 (+0000) Subject: net: sctp: sctp_inq: remove dead code X-Git-Tag: v3.10-rc1~66^2~109 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee16371e6c737684215ee10b4b9756b610d81272;p=profile%2Fcommon%2Fkernel-common.git net: sctp: sctp_inq: remove dead code sctp_inq is never kmalloced, since it's integrated into sctp_ep_common and only initialized from eps and assocs. Therefore, remove the dead code from there. Signed-off-by: Daniel Borkmann Acked-by: Neil Horman Signed-off-by: David S. Miller --- diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 3c1bb8d..125a19c 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -991,8 +991,6 @@ struct sctp_inq { * messages. */ struct work_struct immediate; - - int malloced; /* Is this structure kfree()able? */ }; void sctp_inq_init(struct sctp_inq *); diff --git a/net/sctp/inqueue.c b/net/sctp/inqueue.c index 2d5ad28..3221d07 100644 --- a/net/sctp/inqueue.c +++ b/net/sctp/inqueue.c @@ -58,8 +58,6 @@ void sctp_inq_init(struct sctp_inq *queue) /* Create a task for delivering data. */ INIT_WORK(&queue->immediate, NULL); - - queue->malloced = 0; } /* Release the memory associated with an SCTP inqueue. */ @@ -80,11 +78,6 @@ void sctp_inq_free(struct sctp_inq *queue) sctp_chunk_free(queue->in_progress); queue->in_progress = NULL; } - - if (queue->malloced) { - /* Dump the master memory segment. */ - kfree(queue); - } } /* Put a new packet in an SCTP inqueue.