Print this page
patch cleanup
6659 nvlist_free(NULL) is a no-op

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/retire_store.c
          +++ new/usr/src/uts/common/os/retire_store.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  #include <sys/ddi.h>
  29   27  #include <sys/sunddi.h>
  30   28  #include <sys/sunndi.h>
  31   29  #include <sys/ddi_impldefs.h>
  32   30  #include <sys/ddi_implfuncs.h>
  33   31  #include <sys/list.h>
  34   32  #include <sys/reboot.h>
  35   33  #include <sys/sysmacros.h>
  36   34  #include <sys/console.h>
  37   35  #include <sys/devcache.h>
↓ open down ↓ 265 lines elided ↑ open up ↑
 303  301                  }
 304  302                  nvlist_free(line_nvl);
 305  303                  line_nvl = NULL;
 306  304          }
 307  305  
 308  306          *ret_nvl = nvl;
 309  307          STORE_DBG((CE_NOTE, "packed retire list into nvlist"));
 310  308          return (DDI_SUCCESS);
 311  309  
 312  310  error:
 313      -        if (line_nvl)
 314      -                nvlist_free(line_nvl);
      311 +        nvlist_free(line_nvl);
 315  312          ASSERT(nvl);
 316  313          nvlist_free(nvl);
 317  314          return (DDI_FAILURE);
 318  315  }
 319  316  
 320  317  int
 321  318  e_ddi_retire_persist(char *devpath)
 322  319  {
 323  320          rio_store_t     *rsp;
 324  321          rio_store_t     *new_rsp;
↓ open down ↓ 133 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX