Print this page
10096 kstat update routines shouldn't check for NULL kstat
@@ -21,10 +21,14 @@
/*
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
*/
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
#include <sys/types.h>
#include <sys/stream.h>
#include <sys/cmn_err.h>
#define _SUN_TPI_VERSION 2
#include <sys/tihdr.h>
@@ -58,11 +62,11 @@
netstackid_t stackid = (netstackid_t)(uintptr_t)kp->ks_private;
netstack_t *ns;
sctp_stack_t *sctps;
mib2_sctp_t sctp_mib;
- if (kp == NULL|| kp->ks_data == NULL)
+ if (kp->ks_data == NULL)
return (EIO);
if (rw == KSTAT_WRITE)
return (EACCES);