Fix a pair of nasty locking problems in the ax88796 driver
spotted by a sparse check:
warning: context imbalance in 'ax_get_settings' - wrong count at exit
warning: context imbalance in 'ax_set_settings' - wrong count at exit
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
spin_lock_irqsave(&ax->mii_lock, flags);
mii_ethtool_gset(&ax->mii, cmd);
- spin_lock_irqsave(&ax->mii_lock, flags);
+ spin_unlock_irqrestore(&ax->mii_lock, flags);
return 0;
}
spin_lock_irqsave(&ax->mii_lock, flags);
rc = mii_ethtool_sset(&ax->mii, cmd);
- spin_lock_irqsave(&ax->mii_lock, flags);
+ spin_unlock_irqrestore(&ax->mii_lock, flags);
return rc;
}