Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ae88c94 authored by Ying Xue's avatar Ying Xue Committed by David S. Miller
Browse files

tipc: use bearer_disable to disable bearer in tipc_l2_device_event



As bearer pointer is known in tipc_l2_device_event(), it's unnecessary
to search it again in tipc_disable_bearer(). If tipc_disable_bearer()
is replaced with bearer_disable() in tipc_l2_device_event(), this will
help us save a bit time when bearer is disabled.

Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Reviewed-by: default avatarErik Hugne <erik.hugne@ericsson.com>
Tested-by: default avatarErik Hugne <erik.hugne@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f1c8d8cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -606,7 +606,7 @@ static int tipc_l2_device_event(struct notifier_block *nb, unsigned long evt,
		break;
		break;
	case NETDEV_UNREGISTER:
	case NETDEV_UNREGISTER:
	case NETDEV_CHANGENAME:
	case NETDEV_CHANGENAME:
		tipc_disable_bearer(b_ptr->name);
		bearer_disable(b_ptr, false);
		break;
		break;
	}
	}
	return NOTIFY_OK;
	return NOTIFY_OK;