diff options
Diffstat (limited to 'net/dccp/ccid.h')
-rw-r--r-- | net/dccp/ccid.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h index 75c3582a7678..fb85d371a8de 100644 --- a/net/dccp/ccid.h +++ b/net/dccp/ccid.h | |||
@@ -246,7 +246,7 @@ static inline int ccid_hc_rx_getsockopt(struct ccid *ccid, struct sock *sk, | |||
246 | u32 __user *optval, int __user *optlen) | 246 | u32 __user *optval, int __user *optlen) |
247 | { | 247 | { |
248 | int rc = -ENOPROTOOPT; | 248 | int rc = -ENOPROTOOPT; |
249 | if (ccid->ccid_ops->ccid_hc_rx_getsockopt != NULL) | 249 | if (ccid != NULL && ccid->ccid_ops->ccid_hc_rx_getsockopt != NULL) |
250 | rc = ccid->ccid_ops->ccid_hc_rx_getsockopt(sk, optname, len, | 250 | rc = ccid->ccid_ops->ccid_hc_rx_getsockopt(sk, optname, len, |
251 | optval, optlen); | 251 | optval, optlen); |
252 | return rc; | 252 | return rc; |
@@ -257,7 +257,7 @@ static inline int ccid_hc_tx_getsockopt(struct ccid *ccid, struct sock *sk, | |||
257 | u32 __user *optval, int __user *optlen) | 257 | u32 __user *optval, int __user *optlen) |
258 | { | 258 | { |
259 | int rc = -ENOPROTOOPT; | 259 | int rc = -ENOPROTOOPT; |
260 | if (ccid->ccid_ops->ccid_hc_tx_getsockopt != NULL) | 260 | if (ccid != NULL && ccid->ccid_ops->ccid_hc_tx_getsockopt != NULL) |
261 | rc = ccid->ccid_ops->ccid_hc_tx_getsockopt(sk, optname, len, | 261 | rc = ccid->ccid_ops->ccid_hc_tx_getsockopt(sk, optname, len, |
262 | optval, optlen); | 262 | optval, optlen); |
263 | return rc; | 263 | return rc; |