Showing error 950

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/e1000e/ich8lan.c
Line in file: 1310
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-03-02 21:35:17 UTC


Source:

1280        } while (count++ < ICH_FLASH_CYCLE_REPEAT_COUNT);
1281
1282        return ret_val;
1283}
1284
1285/**
1286 *  e1000_write_nvm_ich8lan - Write word(s) to the NVM
1287 *  @hw: pointer to the HW structure
1288 *  @offset: The offset (in bytes) of the word(s) to write.
1289 *  @words: Size of data to write in words
1290 *  @data: Pointer to the word(s) to write at offset.
1291 *
1292 *  Writes a byte or word to the NVM using the flash access registers.
1293 **/
1294static s32 e1000_write_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words,
1295                                   u16 *data)
1296{
1297        struct e1000_nvm_info *nvm = &hw->nvm;
1298        struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
1299        s32 ret_val;
1300        u16 i;
1301
1302        if ((offset >= nvm->word_size) || (words > nvm->word_size - offset) ||
1303            (words == 0)) {
1304                hw_dbg(hw, "nvm parameter(s) out of bounds\n");
1305                return -E1000_ERR_NVM;
1306        }
1307
1308        ret_val = e1000_acquire_swflag_ich8lan(hw);
1309        if (ret_val)
1310                return ret_val;
1311
1312        for (i = 0; i < words; i++) {
1313                dev_spec->shadow_ram[offset+i].modified = 1;
1314                dev_spec->shadow_ram[offset+i].value = data[i];
1315        }
1316
1317        e1000_release_swflag_ich8lan(hw);
1318
1319        return 0;
1320}
Show full sources