Showing error 1290

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: 392
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 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
 383        for (i = 0; i < config->tx_fifo_num; i++)
 384                spin_lock_irqsave(&mac_control->fifos[i].tx_lock, flags[i]);
 385
 386        if (nic->vlgrp)
 387                vlan_group_set_device(nic->vlgrp, vid, NULL);
 388
 389        for (i = config->tx_fifo_num - 1; i >= 0; i--)
 390                spin_unlock_irqrestore(&mac_control->fifos[i].tx_lock,
 391                        flags[i]);
 392}
 393
 394/*
 395 * Constants to be programmed into the Xena's registers, to configure
 396 * the XAUI.
 397 */
 398
 399#define        END_SIGN        0x0
 400static const u64 herc_act_dtx_cfg[] = {
 401        /* Set address */
 402        0x8000051536750000ULL, 0x80000515367500E0ULL,
Show full sources