Showing error 1569

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/block/cciss_scsi.c
Line in file: 1618
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-29 20:11:37 UTC


Source:

1588*/
1589
1590static int cciss_eh_device_reset_handler(struct scsi_cmnd *scsicmd)
1591{
1592        int rc;
1593        CommandList_struct *cmd_in_trouble;
1594        ctlr_info_t **c;
1595        int ctlr;
1596
1597        /* find the controller to which the command to be aborted was sent */
1598        c = (ctlr_info_t **) &scsicmd->device->host->hostdata[0];        
1599        if (c == NULL) /* paranoia */
1600                return FAILED;
1601        ctlr = (*c)->ctlr;
1602        printk(KERN_WARNING "cciss%d: resetting tape drive or medium changer.\n", ctlr);
1603
1604        /* find the command that's giving us trouble */
1605        cmd_in_trouble = (CommandList_struct *) scsicmd->host_scribble;
1606        if (cmd_in_trouble == NULL) { /* paranoia */
1607                return FAILED;
1608        }
1609        /* send a reset to the SCSI LUN which the command was sent to */
1610        rc = sendcmd(CCISS_RESET_MSG, ctlr, NULL, 0, 2, 0, 0, 
1611                (unsigned char *) &cmd_in_trouble->Header.LUN.LunAddrBytes[0], 
1612                TYPE_MSG);
1613        /* sendcmd turned off interrupts on the board, turn 'em back on. */
1614        (*c)->access.set_intr_mask(*c, CCISS_INTR_ON);
1615        if (rc == 0)
1616                return SUCCESS;
1617        printk(KERN_WARNING "cciss%d: resetting device failed.\n", ctlr);
1618        return FAILED;
1619}
1620
1621static int  cciss_eh_abort_handler(struct scsi_cmnd *scsicmd)
1622{
1623        int rc;
1624        CommandList_struct *cmd_to_abort;
1625        ctlr_info_t **c;
1626        int ctlr;
1627
1628        /* find the controller to which the command to be aborted was sent */
Show full sources