[IRDA] donauboe: locking fix
From: Andrew Morton <akpm@osdl.org> Two missing unlocks, as noted by Ted Unangst <tedu@coverity.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b3f9b92a6e
commit
ac7c98eca8
|
@ -1459,8 +1459,10 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
|
||||||
*/
|
*/
|
||||||
IRDA_DEBUG (1, "%s(BANDWIDTH), %s, (%X/%ld\n", __FUNCTION__
|
IRDA_DEBUG (1, "%s(BANDWIDTH), %s, (%X/%ld\n", __FUNCTION__
|
||||||
,dev->name, INB (OBOE_STATUS), irq->ifr_baudrate );
|
,dev->name, INB (OBOE_STATUS), irq->ifr_baudrate );
|
||||||
if (!in_interrupt () && !capable (CAP_NET_ADMIN))
|
if (!in_interrupt () && !capable (CAP_NET_ADMIN)) {
|
||||||
return -EPERM;
|
ret = -EPERM;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
/* self->speed=irq->ifr_baudrate; */
|
/* self->speed=irq->ifr_baudrate; */
|
||||||
/* toshoboe_setbaud(self); */
|
/* toshoboe_setbaud(self); */
|
||||||
|
@ -1470,8 +1472,10 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
|
||||||
case SIOCSMEDIABUSY: /* Set media busy */
|
case SIOCSMEDIABUSY: /* Set media busy */
|
||||||
IRDA_DEBUG (1, "%s(MEDIABUSY), %s, (%X/%x)\n", __FUNCTION__
|
IRDA_DEBUG (1, "%s(MEDIABUSY), %s, (%X/%x)\n", __FUNCTION__
|
||||||
,dev->name, INB (OBOE_STATUS), capable (CAP_NET_ADMIN) );
|
,dev->name, INB (OBOE_STATUS), capable (CAP_NET_ADMIN) );
|
||||||
if (!capable (CAP_NET_ADMIN))
|
if (!capable (CAP_NET_ADMIN)) {
|
||||||
return -EPERM;
|
ret = -EPERM;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
irda_device_set_media_busy (self->netdev, TRUE);
|
irda_device_set_media_busy (self->netdev, TRUE);
|
||||||
break;
|
break;
|
||||||
case SIOCGRECEIVING: /* Check if we are receiving right now */
|
case SIOCGRECEIVING: /* Check if we are receiving right now */
|
||||||
|
@ -1483,7 +1487,7 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
|
||||||
IRDA_DEBUG (1, "%s(?), %s, (cmd=0x%X)\n", __FUNCTION__, dev->name, cmd);
|
IRDA_DEBUG (1, "%s(?), %s, (cmd=0x%X)\n", __FUNCTION__, dev->name, cmd);
|
||||||
ret = -EOPNOTSUPP;
|
ret = -EOPNOTSUPP;
|
||||||
}
|
}
|
||||||
|
out:
|
||||||
spin_unlock_irqrestore(&self->spinlock, flags);
|
spin_unlock_irqrestore(&self->spinlock, flags);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue