Showing error 1311

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/scsi/qla2xxx/qla_dbg.c
Line in file: 929
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 899
 900        rval = qla24xx_soft_reset(ha);
 901        if (rval != QLA_SUCCESS)
 902                goto qla24xx_fw_dump_failed_0;
 903
 904        rval = qla24xx_dump_memory(ha, fw->code_ram, sizeof(fw->code_ram),
 905            &nxt);
 906        if (rval != QLA_SUCCESS)
 907                goto qla24xx_fw_dump_failed_0;
 908
 909        nxt = qla2xxx_copy_queues(ha, nxt);
 910        if (ha->eft)
 911                memcpy(nxt, ha->eft, ntohl(ha->fw_dump->eft_size));
 912
 913qla24xx_fw_dump_failed_0:
 914        if (rval != QLA_SUCCESS) {
 915                qla_printk(KERN_WARNING, ha,
 916                    "Failed to dump firmware (%x)!!!\n", rval);
 917                ha->fw_dumped = 0;
 918
 919        } else {
 920                qla_printk(KERN_INFO, ha,
 921                    "Firmware dump saved to temp buffer (%ld/%p).\n",
 922                    ha->host_no, ha->fw_dump);
 923                ha->fw_dumped = 1;
 924        }
 925
 926qla24xx_fw_dump_failed:
 927        if (!hardware_locked)
 928                spin_unlock_irqrestore(&ha->hardware_lock, flags);
 929}
 930
 931void
 932qla25xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked)
 933{
 934        int                rval;
 935        uint32_t        cnt;
 936        uint32_t        risc_address;
 937
 938        struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
 939        uint32_t __iomem *dmp_reg;
Show full sources