Commit e5dbafd4 authored by François Romieu's avatar François Romieu Committed by Linus Torvalds

[PATCH] Clean up missing spin_unlock_irqrestore from rrunner driver

This is a cleaner fix that avoids having two separate unlock
operations.
parent 0ac17865
......@@ -1641,14 +1641,13 @@ static int rr_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
spin_lock_irqsave(&rrpriv->lock, flags);
i = rr_read_eeprom(rrpriv, 0, image, EEPROM_BYTES);
spin_unlock_irqrestore(&rrpriv->lock, flags);
if (i != EEPROM_BYTES){
printk(KERN_ERR "%s: Error reading EEPROM\n",
dev->name);
error = -EFAULT;
spin_unlock_irqrestore(&rrpriv->lock, flags);
goto gf_out;
}
spin_unlock_irqrestore(&rrpriv->lock, flags);
error = copy_to_user(rq->ifr_data, image, EEPROM_BYTES);
if (error)
error = -EFAULT;
......
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