Print this page
5253 kmem_alloc/kmem_zalloc won't fail with KM_SLEEP
5254 getrbuf won't fail with KM_SLEEP

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/os/fmsmb.c
          +++ new/usr/src/uts/intel/os/fmsmb.c
↓ open down ↓ 644 lines elided ↑ open up ↑
 645  645          int rc;
 646  646  
 647  647  
 648  648          (void) smbios_info_bboard(shp, bb_id, &bb);
 649  649          cont_count = (uint_t)bb.smbb_contn;
 650  650          if (cont_count == 0)
 651  651                  return (0);
 652  652  
 653  653          cont_len = sizeof (id_t);
 654  654          cont_hdl = kmem_zalloc(cont_count * cont_len, KM_SLEEP);
 655      -        if (cont_hdl == NULL)
 656      -                return (0);
 657  655  
 658  656          rc = smbios_info_contains(shp, bb_id, cont_count, cont_hdl);
 659  657          if (rc > SMB_CONT_MAX) {
 660  658                  kmem_free(cont_hdl, cont_count * cont_len);
 661  659                  return (0);
 662  660          }
 663  661          cont_count = MIN(rc, cont_count);
 664  662  
 665  663          for (n = 0; n < cont_count; n++) {
 666  664                  cont_id = (uint16_t)cont_hdl[n];
↓ open down ↓ 474 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX