Print this page
10083 smatch fixes for common/fs/vfs.c

@@ -19,11 +19,11 @@
  * CDDL HEADER END
  */
 
 /*
  * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2016 Joyent, Inc.
+ * Copyright (c) 2018, Joyent, Inc.
  * Copyright 2016 Toomas Soome <tsoome@me.com>
  * Copyright (c) 2016, 2017 by Delphix. All rights reserved.
  * Copyright 2016 Nexenta Systems, Inc.
  * Copyright 2017 RackTop Systems.
  */

@@ -1059,11 +1059,10 @@
         if (!err)
                 vfsp->vfs_lofi_id = 0;
 
 out:
         ldi_ident_release(ldi_id);
-        if (li != NULL)
                 kmem_free(li, sizeof (*li));
 }
 
 /*
  * Common mount code.  Called from the system call entry point, from autofs,

@@ -4230,11 +4229,11 @@
          */
 
         for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) {
                 RLOCK_VFSSW();
                 if (vswp->vsw_init != NULL)
-                        (*vswp->vsw_init)(vswp - vfssw, vswp->vsw_name);
+                        (void) (*vswp->vsw_init)(vswp - vfssw, vswp->vsw_name);
                 RUNLOCK_VFSSW();
         }
 
         vopstats_startup();