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/beep.c
          +++ new/usr/src/uts/common/io/beep.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  27      -
  28   26  /*
  29   27   * This is the Beep module for supporting keyboard beep for keyboards
  30   28   * that do not have the beeping feature within themselves
  31   29   *
  32   30   */
  33   31  
  34   32  #include <sys/types.h>
  35   33  #include <sys/conf.h>
  36   34  
  37   35  #include <sys/ddi.h>
↓ open down ↓ 67 lines elided ↑ open up ↑
 105  103                  return (DDI_SUCCESS);
 106  104          }
 107  105  
 108  106          queue = kmem_zalloc(sizeof (beep_entry_t) * beep_queue_size,
 109  107              KM_SLEEP);
 110  108  
 111  109          BEEP_DEBUG1((CE_CONT,
 112  110              "beep_init : beep_queue kmem_zalloc(%d) = 0x%lx.",
 113  111              (int)sizeof (beep_entry_t) * beep_queue_size,
 114  112              (unsigned long)queue));
 115      -
 116      -        if (queue == NULL) {
 117      -                BEEP_DEBUG((CE_WARN,
 118      -                    "beep_init : kmem_zalloc of beep_queue failed."));
 119      -                return (DDI_FAILURE);
 120      -        }
 121  113  
 122  114          beep_state.arg = arg;
 123  115          beep_state.mode = BEEP_OFF;
 124  116          beep_state.beep_freq = beep_freq_func;
 125  117          beep_state.beep_on = beep_on_func;
 126  118          beep_state.beep_off = beep_off_func;
 127  119          beep_state.timeout_id = 0;
 128  120  
 129  121          beep_state.queue_head = 0;
 130  122          beep_state.queue_tail = 0;
↓ open down ↓ 387 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX