diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-01-31 18:10:03 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-02 19:29:43 -0800 |
commit | 7d37d0c1591b95ec4e663f7c00eccd5938797a99 (patch) | |
tree | d4baedc4342665099f769f08c405c19dbb0bf3fe /net/sctp/associola.c | |
parent | 193cdc4a041cedf82967390879d0b9bab5278e92 (diff) | |
download | op-kernel-dev-7d37d0c1591b95ec4e663f7c00eccd5938797a99.zip op-kernel-dev-7d37d0c1591b95ec4e663f7c00eccd5938797a99.tar.gz |
net: sctp: Deletion of an unnecessary check before the function call "kfree"
The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r-- | net/sctp/associola.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 26d06db..197c3f5 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c @@ -391,8 +391,7 @@ void sctp_association_free(struct sctp_association *asoc) sctp_asconf_queue_teardown(asoc); /* Free pending address space being deleted */ - if (asoc->asconf_addr_del_pending != NULL) - kfree(asoc->asconf_addr_del_pending); + kfree(asoc->asconf_addr_del_pending); /* AUTH - Free the endpoint shared keys */ sctp_auth_destroy_keys(&asoc->endpoint_shared_keys); |