diff options
Diffstat (limited to 'net/dccp/ccid.c')
-rw-r--r-- | net/dccp/ccid.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c index 9d8fc0e289ea..06b191a5740b 100644 --- a/net/dccp/ccid.c +++ b/net/dccp/ccid.c | |||
@@ -59,9 +59,6 @@ int ccid_register(struct ccid *ccid) | |||
59 | { | 59 | { |
60 | int err; | 60 | int err; |
61 | 61 | ||
62 | if (ccid->ccid_init == NULL) | ||
63 | return -1; | ||
64 | |||
65 | ccids_write_lock(); | 62 | ccids_write_lock(); |
66 | err = -EEXIST; | 63 | err = -EEXIST; |
67 | if (ccids[ccid->ccid_id] == NULL) { | 64 | if (ccids[ccid->ccid_id] == NULL) { |
@@ -106,7 +103,7 @@ struct ccid *ccid_init(unsigned char id, struct sock *sk) | |||
106 | if (!try_module_get(ccid->ccid_owner)) | 103 | if (!try_module_get(ccid->ccid_owner)) |
107 | goto out_err; | 104 | goto out_err; |
108 | 105 | ||
109 | if (ccid->ccid_init(sk) != 0) | 106 | if (ccid->ccid_init != NULL && ccid->ccid_init(sk) != 0) |
110 | goto out_module_put; | 107 | goto out_module_put; |
111 | out: | 108 | out: |
112 | ccids_read_unlock(); | 109 | ccids_read_unlock(); |