Print this page
patch tsoome-feedback

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/dcs/sparc/sun4u/ri_init.c
          +++ new/usr/src/cmd/dcs/sparc/sun4u/ri_init.c
↓ open down ↓ 723 lines elided ↑ open up ↑
 724  724  #endif /* DEBUG */
 725  725  
 726  726          (void) rcm_request_capacity_change(rcm->hdl, RCM_CPU_ALL,
 727  727              RCM_QUERY|RCM_SCOPE, nvl, &rcm_info);
 728  728  
 729  729          rv = add_rcm_clients(&ri_hdl->cpu_cap_clients, rcm, rcm_info, 0, NULL);
 730  730  
 731  731  out:
 732  732          s_free(syscpuids);
 733  733          s_free(newcpuids);
 734      -        if (nvl != NULL)
 735      -                nvlist_free(nvl);
      734 +        nvlist_free(nvl);
 736  735          if (rcm_info != NULL)
 737  736                  rcm_free_info(rcm_info);
 738  737  
 739  738          return (rv);
 740  739  }
 741  740  
 742  741  static int
 743  742  syscpus(cpuid_t **cpuids, int *ncpus)
 744  743  {
 745  744          kstat_t         *ksp;
↓ open down ↓ 1018 lines elided ↑ open up ↑
1764 1763  {
1765 1764          ri_ap_t         *ap, *tmp;
1766 1765  
1767 1766          if ((ap = calloc(1, sizeof (*ap))) == NULL) {
1768 1767                  dprintf((stderr, "calloc: %s\n", strerror(errno)));
1769 1768                  return (NULL);
1770 1769          }
1771 1770  
1772 1771          if (nvlist_alloc(&ap->conf_props, NV_UNIQUE_NAME, 0) != 0 ||
1773 1772              nvlist_add_string(ap->conf_props, RI_AP_REQ_ID, ap_id) != 0) {
1774      -                if (ap->conf_props != NULL)
1775      -                        nvlist_free(ap->conf_props);
     1773 +                nvlist_free(ap->conf_props);
1776 1774                  free(ap);
1777 1775                  return (NULL);
1778 1776          }
1779 1777  
1780 1778          if ((tmp = hdl->aps) == NULL) {
1781 1779                  hdl->aps = ap;
1782 1780          } else {
1783 1781                  while (tmp->next != NULL) {
1784 1782                          tmp = tmp->next;
1785 1783                  }
↓ open down ↓ 294 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX