diff options
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/at76_usb/at76_usb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/at76_usb/at76_usb.c b/drivers/staging/at76_usb/at76_usb.c index 52df0c665183..174e2bec9223 100644 --- a/drivers/staging/at76_usb/at76_usb.c +++ b/drivers/staging/at76_usb/at76_usb.c @@ -2319,9 +2319,11 @@ static int at76_iw_handler_get_scan(struct net_device *netdev, if (!iwe) return -ENOMEM; - if (priv->scan_state != SCAN_COMPLETED) + if (priv->scan_state != SCAN_COMPLETED) { /* scan not yet finished */ + kfree(iwe); return -EAGAIN; + } spin_lock_irqsave(&priv->bss_list_spinlock, flags); |