Commit 7e5c6bc0 authored by Jean Tourrilhes's avatar Jean Tourrilhes Committed by Linus Torvalds

[PATCH] irda_device() oops fix

Acked-by: default avatar"David S. Miller" <davem@davemloft.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6775cab9
...@@ -125,8 +125,15 @@ void irda_device_set_media_busy(struct net_device *dev, int status) ...@@ -125,8 +125,15 @@ void irda_device_set_media_busy(struct net_device *dev, int status)
self = (struct irlap_cb *) dev->atalk_ptr; self = (struct irlap_cb *) dev->atalk_ptr;
IRDA_ASSERT(self != NULL, return;); /* Some drivers may enable the receive interrupt before calling
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); * irlap_open(), or they may disable the receive interrupt
* after calling irlap_close().
* The IrDA stack is protected from this in irlap_driver_rcv().
* However, the driver calls directly the wrapper, that calls
* us directly. Make sure we protect ourselves.
* Jean II */
if (!self || self->magic != LAP_MAGIC)
return;
if (status) { if (status) {
self->media_busy = TRUE; self->media_busy = TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment