Print this page
10135 picl plugins need smatch fixes

@@ -19,10 +19,12 @@
  * CDDL HEADER END
  */
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2018, Joyent, Inc.
  */
 
 /*
  * This plugin creates memory configuration nodes and properties in the
  * PICL tree for Cheetah platforms.

@@ -420,13 +422,13 @@
                 msegh_info[i] = msegh;
 
                 /*
                  * Add property, Size to memory-segment node
                  */
-                if ((ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION,
+                err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION,
                     PICL_PTYPE_UNSIGNED_INT, PICL_READ, sizeof (mcseg->size),
-                    PICL_PROP_SIZE, NULL, NULL)) != PICL_SUCCESS)
+                    PICL_PROP_SIZE, NULL, NULL);
                 if (err != PICL_SUCCESS)
                         break;
 
                 memsize += mcseg->size;
                 err = ptree_create_and_add_prop(msegh, &propinfo, &mcseg->size,