Showing error 1037

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_iocb.c
Line in file: 540
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

510                        /* Zero out packet. */
511                        dword_ptr = (uint32_t *)pkt;
512                        for (cnt = 0; cnt < REQUEST_ENTRY_SIZE / 4; cnt++)
513                                *dword_ptr++ = 0;
514
515                        /* Set system defined field. */
516                        pkt->sys_define = (uint8_t)ha->req_ring_index;
517
518                        /* Set entry count. */
519                        pkt->entry_count = 1;
520
521                        break;
522                }
523
524                /* Release ring specific lock */
525                spin_unlock(&ha->hardware_lock);
526
527                udelay(2);   /* 2 us */
528
529                /* Check for pending interrupts. */
530                /* During init we issue marker directly */
531                if (!ha->marker_needed && !ha->flags.init_done)
532                        qla2x00_poll(ha);
533
534                spin_lock_irq(&ha->hardware_lock);
535        }
536        if (!pkt) {
537                DEBUG2_3(printk("%s(): **** FAILED ****\n", __func__));
538        }
539
540        return (pkt);
541}
542
543/**
544 * qla2x00_isp_cmd() - Modify the request ring pointer.
545 * @ha: HA context
546 *
547 * Note: The caller must hold the hardware lock before calling this routine.
548 */
549static void
550qla2x00_isp_cmd(scsi_qla_host_t *ha)
Show full sources