mirror of
https://github.com/ipxe/ipxe.git
synced 2026-05-12 15:56:18 +02:00
[interface] Avoid unnecessary reference counting in intf_unplug()
The null interface does not have a reference counter, so the call to intf_get() is always redundant. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
941c53a3bf
commit
8ef4e7c572
@ -113,7 +113,10 @@ void intf_plug_plug ( struct interface *a, struct interface *b ) {
|
||||
* @v intf Object interface
|
||||
*/
|
||||
void intf_unplug ( struct interface *intf ) {
|
||||
intf_plug ( intf, &null_intf );
|
||||
DBGC ( INTF_COL ( intf ), "INTF " INTF_INTF_FMT " unplug\n",
|
||||
INTF_INTF_DBG ( intf, intf->dest ) );
|
||||
intf_put ( intf->dest );
|
||||
intf->dest = &null_intf;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user