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/sun4/io/pcicfg.c
          +++ new/usr/src/uts/sun4/io/pcicfg.c
↓ open down ↓ 5971 lines elided ↑ open up ↑
5972 5972              (ddi_get8(h, addr + start_of_fcode + 6) << 8) |
5973 5973              (ddi_get8(h, addr + start_of_fcode + 7));
5974 5974  
5975 5975          DEBUG1("Fcode Size %x\n", *fcode_size);
5976 5976  
5977 5977          /*
5978 5978           * Allocate page aligned buffer space
5979 5979           */
5980 5980          *fcode_addr = kmem_zalloc(ptob(btopr(*fcode_size)), KM_SLEEP);
5981 5981  
5982      -        if (*fcode_addr == NULL) {
5983      -                DEBUG0("kmem_zalloc returned NULL\n");
5984      -                pcicfg_unmap_phys(&h, &p);
5985      -                return (PCICFG_FAILURE);
5986      -        }
5987      -
5988 5982          DEBUG1("Fcode Addr %lx\n", *fcode_addr);
5989 5983  
5990 5984          ddi_rep_get8(h, *fcode_addr, addr + start_of_fcode, *fcode_size,
5991 5985              DDI_DEV_AUTOINCR);
5992 5986  
5993 5987          pcicfg_unmap_phys(&h, &p);
5994 5988  
5995 5989          return (PCICFG_SUCCESS);
5996 5990  }
5997 5991  
↓ open down ↓ 850 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX