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/common/io/rtw/rtw.c
          +++ new/usr/src/uts/common/io/rtw/rtw.c
↓ open down ↓ 808 lines elided ↑ open up ↑
 809  809          }
 810  810  
 811  811          ecr &= ~(RTW_9346CR_EEDI | RTW_9346CR_EEDO | RTW_9346CR_EESK |
 812  812              RTW_9346CR_EEM_MASK | RTW_9346CR_EECS);
 813  813          ecr |= RTW_9346CR_EEM_PROGRAM;
 814  814  
 815  815          RTW_WRITE8(regs, RTW_9346CR, ecr);
 816  816  
 817  817          sr->sr_content = kmem_zalloc(sr->sr_size, KM_SLEEP);
 818  818  
 819      -        if (sr->sr_content == NULL) {
 820      -                cmn_err(CE_WARN, "%s: unable to allocate SROM buffer\n",
 821      -                    dvname);
 822      -                return (ENOMEM);
 823      -        }
 824      -
 825  819          (void) memset(sr->sr_content, 0, sr->sr_size);
 826  820  
 827  821          /*
 828  822           * RTL8180 has a single 8-bit register for controlling the
 829  823           * 93cx6 SROM.  There is no "ready" bit. The RTL8180
 830  824           * input/output sense is the reverse of read_seeprom's.
 831  825           */
 832  826          sd.sd_handle = regs->r_handle;
 833  827          sd.sd_base = regs->r_base;
 834  828          sd.sd_regsize = 1;
↓ open down ↓ 2594 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX