Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b77d661 authored by Zhang Yanfei's avatar Zhang Yanfei Committed by Jiri Kosina
Browse files

net: sctp: remove cast for kmalloc/kzalloc return value



remove cast for kmalloc/kzalloc return value.

Signed-off-by: default avatarZhang Yanfei <zhangyanfei@cn.fujitsu.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Cc: Vlad Yasevich <vyasevich@gmail.com>
Cc: Sridhar Samudrala <sri@us.ibm.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-sctp@vger.kernel.org
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 6e51c9ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -576,7 +576,7 @@ for (pos = chunk->subh.fwdtsn_hdr->skip;\
#define WORD_ROUND(s) (((s)+3)&~3)
#define WORD_ROUND(s) (((s)+3)&~3)


/* Make a new instance of type.  */
/* Make a new instance of type.  */
#define t_new(type, flags)	(type *)kzalloc(sizeof(type), flags)
#define t_new(type, flags)	kzalloc(sizeof(type), flags)


/* Compare two timevals.  */
/* Compare two timevals.  */
#define tv_lt(s, t) \
#define tv_lt(s, t) \
+1 −1
Original line number Original line Diff line number Diff line
@@ -1403,7 +1403,7 @@ SCTP_STATIC __init int sctp_init(void)


	/* Allocate and initialize the endpoint hash table.  */
	/* Allocate and initialize the endpoint hash table.  */
	sctp_ep_hashsize = 64;
	sctp_ep_hashsize = 64;
	sctp_ep_hashtable = (struct sctp_hashbucket *)
	sctp_ep_hashtable =
		kmalloc(64 * sizeof(struct sctp_hashbucket), GFP_KERNEL);
		kmalloc(64 * sizeof(struct sctp_hashbucket), GFP_KERNEL);
	if (!sctp_ep_hashtable) {
	if (!sctp_ep_hashtable) {
		pr_err("Failed endpoint_hash alloc\n");
		pr_err("Failed endpoint_hash alloc\n");