Print this page
patch tsoome-feedback

@@ -72,11 +72,10 @@
 
 /*ARGSUSED*/
 static int
 set_error(topo_hdl_t *thp, int err, int *errp, char *method, nvlist_t *nvlp)
 {
-        if (nvlp != NULL)
                 nvlist_free(nvlp);
 
         topo_dprintf(thp, TOPO_DBG_ERR, "%s failed: %s\n", method,
             topo_strerror(err));
 

@@ -86,11 +85,10 @@
 
 /*ARGSUSED*/
 static nvlist_t *
 set_nverror(topo_hdl_t *thp, int err, int *errp, char *method, nvlist_t *nvlp)
 {
-        if (nvlp != NULL)
                 nvlist_free(nvlp);
 
         topo_dprintf(thp, TOPO_DBG_ERR, "%s failed: %s\n", method,
             topo_strerror(err));
 

@@ -591,11 +589,10 @@
             TOPO_METH_PROP_SET_VERSION, in, &out, err);
 
         nvlist_free(in);
 
         /* no return values */
-        if (out != NULL)
                 nvlist_free(out);
 
         if (rv)
                 return (-1);