Showing error 1575

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: 1030
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-29 20:11:37 UTC


Source:

1000        return 0;
1001}
1002
1003/**
1004 *  e1000_read_nvm_ich8lan - Read word(s) from the NVM
1005 *  @hw: pointer to the HW structure
1006 *  @offset: The offset (in bytes) of the word(s) to read.
1007 *  @words: Size of data to read in words
1008 *  @data: Pointer to the word(s) to read at offset.
1009 *
1010 *  Reads a word(s) from the NVM using the flash access registers.
1011 **/
1012static s32 e1000_read_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words,
1013                                  u16 *data)
1014{
1015        struct e1000_nvm_info *nvm = &hw->nvm;
1016        struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
1017        u32 act_offset;
1018        s32 ret_val;
1019        u32 bank = 0;
1020        u16 i, word;
1021
1022        if ((offset >= nvm->word_size) || (words > nvm->word_size - offset) ||
1023            (words == 0)) {
1024                hw_dbg(hw, "nvm parameter(s) out of bounds\n");
1025                return -E1000_ERR_NVM;
1026        }
1027
1028        ret_val = e1000_acquire_swflag_ich8lan(hw);
1029        if (ret_val)
1030                return ret_val;
1031
1032        ret_val = e1000_valid_nvm_bank_detect_ich8lan(hw, &bank);
1033        if (ret_val)
1034                return ret_val;
1035
1036        act_offset = (bank) ? nvm->flash_bank_size : 0;
1037        act_offset += offset;
1038
1039        for (i = 0; i < words; i++) {
1040                if ((dev_spec->shadow_ram) &&
Show full sources