question about ...: wrong count at exit"

Holger Schurig hs4233 at mail.mn-solutions.de
Thu May 29 03:37:22 EDT 2008


After pulling the newest sparse, I got some new sparse warnings
which puzzle me. Here's one of them:

drivers/net/wireless/libertas/main.c:477:9: warning: context imbalance in 'lbs_eth_stop': wrong count at exit
drivers/net/wireless/libertas/main.c:477:9:    context 'lock': wanted 0, got 1

However, the function looks quite innocent, and I cannot see
any imbalance there. Did I oversee something or is that a
problem of sparse?

static int lbs_eth_stop(struct net_device *dev)
{
        struct lbs_private *priv = (struct lbs_private *) dev->priv;

        lbs_deb_enter(LBS_DEB_NET);

        spin_lock_irq(&priv->driver_lock);
        priv->infra_open = 0;
        netif_stop_queue(dev);
        spin_unlock_irq(&priv->driver_lock);

        schedule_work(&priv->mcast_work);

        lbs_deb_leave(LBS_DEB_NET);
        return 0;
}



More information about the libertas-dev mailing list