rem: power_attach_acpi(softsp);
add: (void) power_attach_acpi(softsp);
context: power_attach(dev_info_t *dip, ddi_attach_cmd_t cmd){	struct power_soft_state *softsp;	switch (cmd) {	case DDI_ATTACH:		break;	case DDI_RESUME:		return (DDI_SUCCESS);	default:		return (DDI_FAILURE);	}	/*	 * If the power node doesn't have "button" property, quietly	 * fail to attach.	 */	if (ddi_prop_exists(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS,	    "button") == 0)		return (DDI_FAILURE);	if (power_inst != -1)		return (DDI_FAILURE);	power_inst = ddi_get_instance(dip);	if (ddi_soft_state_zalloc(power_state, power_inst) != DDI_SUCCESS)		return (DDI_FAILURE);	if (ddi_create_minor_node(dip, "power_button", S_IFCHR,	    (power_inst << 8) + 0, "ddi_power_button", 0) != DDI_SUCCESS)		return (DDI_FAILURE);	softsp = ddi_get_soft_state(power_state, power_inst);	softsp->dip = dip;#ifdef	ACPI_POWER_BUTTON	power_attach_acpi(softsp);#else	if (power_setup_regs(softsp) != DDI_SUCCESS) {		cmn_err(CE_WARN, "power_attach: failed to setup registers");		goto error;	}	if (ddi_get_iblock_cookie(dip, 0,	    &softsp->high_iblock_cookie) != DDI_SUCCESS) {		cmn_err(CE_WARN, "power_attach: ddi_get_soft_iblock_cookie "		    "failed.");		goto error;	}	mutex_init(&softsp->power_intr_mutex, NULL, MUTEX_DRIVER,	    softsp->high_iblock_cookie);	if (ddi_add_intr(dip, 0, &softsp->high_iblock_cookie, NULL,	    power_high_intr, (caddr_t)softsp) != DDI_SUCCESS) {		cmn_err(CE_WARN, "power_attach: failed to add high-level "		    " interrupt handler.");		mutex_destroy(&softsp->power_intr_mutex);		goto error;	}#endif	/* ACPI_POWER_BUTTON */	if (ddi_get_soft_iblock_cookie(dip, DDI_SOFTINT_LOW,	    &softsp->soft_iblock_cookie) != DDI_SUCCESS) {		cmn_err(CE_WARN, "power_attach: ddi_get_soft_iblock_cookie "		    "failed.");		mutex_destroy(&softsp->power_intr_mutex);		ddi_remove_intr(dip, 0, NULL);		goto error;	}	mutex_init(&softsp->power_mutex, NULL, MUTEX_DRIVER,	    (void *)softsp->soft_iblock_cookie);	if (ddi_add_softintr(dip, DDI_SOFTINT_LOW, &softsp->softintr_id,	    NULL, NULL, power_soft_intr, (caddr_t)softsp) != DDI_SUCCESS) {		cmn_err(CE_WARN, "power_attach: failed to add soft "		    "interrupt handler.");		mutex_destroy(&softsp->power_mutex);		mutex_destroy(&softsp->power_intr_mutex);		ddi_remove_intr(dip, 0, NULL);		goto error;	}	ddi_report_dev(dip);	return (DDI_SUCCESS);error:#ifdef	ACPI_POWER_BUTTON	/*	 * detach ACPI power button	 */	power_detach_acpi(softsp);#else	power_free_regs(softsp);#endif	/* ACPI_POWER_BUTTON */	ddi_remove_minor_node(dip, "power_button");	ddi_soft_state_free(power_state, power_inst);	return (DDI_FAILURE);}