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

Commit bae58431 authored by Paul Bolle's avatar Paul Bolle Committed by David S. Miller
Browse files

i4l: do not print a warning when shutting down an i4l ppp interface



When an i4l ppp interface is shut down (e.g. with /sbin/ifdown ippp0) a
scary warning is logged:
    
    isdn_free_channel: called with invalid drv(-1) or channel(-1)
    
This warning is caused by isdn_net_unbind_channel(), which always calls
isdn_free_channel() even if isdn_net_local->isdn_device and
isdn_net_local->isdn_channel are (still) in a perfectly acceptable
default state, so let's not do that.

Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f0d44ae3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -292,7 +292,9 @@ isdn_net_unbind_channel(isdn_net_local * lp)
	lp->dialstate = 0;
	dev->rx_netdev[isdn_dc2minor(lp->isdn_device, lp->isdn_channel)] = NULL;
	dev->st_netdev[isdn_dc2minor(lp->isdn_device, lp->isdn_channel)] = NULL;
	isdn_free_channel(lp->isdn_device, lp->isdn_channel, ISDN_USAGE_NET);
	if (lp->isdn_device != -1 && lp->isdn_channel != -1)
		isdn_free_channel(lp->isdn_device, lp->isdn_channel,
				  ISDN_USAGE_NET);
	lp->flags &= ~ISDN_NET_CONNECTED;
	lp->isdn_device = -1;
	lp->isdn_channel = -1;