Showing error 1313

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


Source:

1228        fcec = nxt + ntohl(ha->fw_dump->eft_size);
1229        fcec->type = __constant_htonl(DUMP_CHAIN_FCE | DUMP_CHAIN_LAST);
1230        fcec->chain_size = htonl(sizeof(struct qla2xxx_fce_chain) +
1231            fce_calc_size(ha->fce_bufs));
1232        fcec->size = htonl(fce_calc_size(ha->fce_bufs));
1233        fcec->addr_l = htonl(LSD(ha->fce_dma));
1234        fcec->addr_h = htonl(MSD(ha->fce_dma));
1235
1236        iter_reg = fcec->eregs;
1237        for (cnt = 0; cnt < 8; cnt++)
1238                *iter_reg++ = htonl(ha->fce_mb[cnt]);
1239
1240        memcpy(iter_reg, ha->fce, ntohl(fcec->size));
1241
1242qla25xx_fw_dump_failed_0:
1243        if (rval != QLA_SUCCESS) {
1244                qla_printk(KERN_WARNING, ha,
1245                    "Failed to dump firmware (%x)!!!\n", rval);
1246                ha->fw_dumped = 0;
1247
1248        } else {
1249                qla_printk(KERN_INFO, ha,
1250                    "Firmware dump saved to temp buffer (%ld/%p).\n",
1251                    ha->host_no, ha->fw_dump);
1252                ha->fw_dumped = 1;
1253        }
1254
1255qla25xx_fw_dump_failed:
1256        if (!hardware_locked)
1257                spin_unlock_irqrestore(&ha->hardware_lock, flags);
1258}
1259
1260/****************************************************************************/
1261/*                         Driver Debug Functions.                          */
1262/****************************************************************************/
1263
1264void
1265qla2x00_dump_regs(scsi_qla_host_t *ha)
1266{
1267        int i;
1268        struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
Show full sources