* [i4l] do not print a warning when shutting down an i4l ppp interface
@ 2009-01-12 12:43 Paul Bolle
2009-01-14 22:41 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Paul Bolle @ 2009-01-12 12:43 UTC (permalink / raw)
To: netdev
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: Paul Bolle <pebolle@tiscali.nl>
---
Sent only to netdev@vger.kernel.org (and not also to
isdn4linux@listserv.isdn4linux.de) because an earlier ISDN patch I wrote
only got a response from this list (and this patch is NETWORKING related
anyway).
---
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index ecc92c8..cb8943d 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [i4l] do not print a warning when shutting down an i4l ppp interface
2009-01-12 12:43 [i4l] do not print a warning when shutting down an i4l ppp interface Paul Bolle
@ 2009-01-14 22:41 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-01-14 22:41 UTC (permalink / raw)
To: pebolle; +Cc: netdev
From: Paul Bolle <pebolle@tiscali.nl>
Date: Mon, 12 Jan 2009 13:43:17 +0100
> 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: Paul Bolle <pebolle@tiscali.nl>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-14 22:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-12 12:43 [i4l] do not print a warning when shutting down an i4l ppp interface Paul Bolle
2009-01-14 22:41 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).