Showing error 1291

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: drivers/net/s2io.c
Line in file: 372
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 342                        timer.data = (unsigned long) arg;        \
 343                        mod_timer(&timer, (jiffies + exp))        \
 344
 345/* copy mac addr to def_mac_addr array */
 346static void do_s2io_copy_mac_addr(struct s2io_nic *sp, int offset, u64 mac_addr)
 347{
 348        sp->def_mac_addr[offset].mac_addr[5] = (u8) (mac_addr);
 349        sp->def_mac_addr[offset].mac_addr[4] = (u8) (mac_addr >> 8);
 350        sp->def_mac_addr[offset].mac_addr[3] = (u8) (mac_addr >> 16);
 351        sp->def_mac_addr[offset].mac_addr[2] = (u8) (mac_addr >> 24);
 352        sp->def_mac_addr[offset].mac_addr[1] = (u8) (mac_addr >> 32);
 353        sp->def_mac_addr[offset].mac_addr[0] = (u8) (mac_addr >> 40);
 354}
 355/* Add the vlan */
 356static void s2io_vlan_rx_register(struct net_device *dev,
 357                                        struct vlan_group *grp)
 358{
 359        int i;
 360        struct s2io_nic *nic = dev->priv;
 361        unsigned long flags[MAX_TX_FIFOS];
 362        struct mac_info *mac_control = &nic->mac_control;
 363        struct config_param *config = &nic->config;
 364
 365        for (i = 0; i < config->tx_fifo_num; i++)
 366                spin_lock_irqsave(&mac_control->fifos[i].tx_lock, flags[i]);
 367
 368        nic->vlgrp = grp;
 369        for (i = config->tx_fifo_num - 1; i >= 0; i--)
 370                spin_unlock_irqrestore(&mac_control->fifos[i].tx_lock,
 371                                flags[i]);
 372}
 373
 374/* Unregister the vlan */
 375static void s2io_vlan_rx_kill_vid(struct net_device *dev, unsigned long vid)
 376{
 377        int i;
 378        struct s2io_nic *nic = dev->priv;
 379        unsigned long flags[MAX_TX_FIFOS];
 380        struct mac_info *mac_control = &nic->mac_control;
 381        struct config_param *config = &nic->config;
 382
Show full sources