[driver-discuss] A question about the validity of the Device Driver Tutorial?
Johann 'Myrkraverk' Oskarsson
myrkraverk at users.sourceforget.net
Sat Nov 18 14:31:05 PST 2006
Hi again,
Lower in the same function, why is ddi_remove_minor_node() called when
the corresponding ddi_create_minor_node() fails?
if (ddi_create_minor_node(dip, QOTD_NAME, S_IFCHR,
instance, DDI_PSEUDO, 0)
!= DDI_SUCCESS) {
cmn_err(CE_WARN, "Cannot create minor node for %d",
instance);
ddi_soft_state_free(dip, instance);
ddi_remove_minor_node(dip, NULL);
return (DDI_FAILURE);
}
Johann
More information about the driver-discuss
mailing list