OSDN Git Service

net: sctp: fix warning "NULL check before some freeing functions is not needed"
authorHariprasad Kelam <hariprasad.kelam@gmail.com>
Tue, 16 Jul 2019 02:20:02 +0000 (07:50 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Jul 2019 19:01:19 +0000 (12:01 -0700)
commit86fda90ab5888d983f7307442ba62978e3504bd3
tree8bfee3a7cedc41a336db405a2d38b2af51795e9e
parentfdd258d49e88a9e0b49ef04a506a796f1c768a8e
net: sctp: fix warning "NULL check before some freeing functions is not needed"

This patch removes NULL checks before calling kfree.

fixes below issues reported by coccicheck
net/sctp/sm_make_chunk.c:2586:3-8: WARNING: NULL check before some
freeing functions is not needed.
net/sctp/sm_make_chunk.c:2652:3-8: WARNING: NULL check before some
freeing functions is not needed.
net/sctp/sm_make_chunk.c:2667:3-8: WARNING: NULL check before some
freeing functions is not needed.
net/sctp/sm_make_chunk.c:2684:3-8: WARNING: NULL check before some
freeing functions is not needed.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/sm_make_chunk.c