Showing error 1302

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


Source:

 551                if( ( csr0 & (RC_RDY | TR_RDY) ) == 0 )
 552                        break;
 553
 554                req_ans = !(nl->state & FL_PREV_OK);
 555
 556                if( csr0 & RC_RDY )
 557                        req_ans = recv_frame( dev );
 558
 559                /*
 560                 * TR_RDY always equals 1 here because we have owned the marker,
 561                 * and we set TR_REQ when disabled interrupts
 562                 */
 563                csr0 = inb( ioaddr + CSR0 );
 564                if( !(csr0 & TR_RDY)  ||  (csr0 & RC_RDY) )
 565                        printk( KERN_ERR "%s: internal error!\n", dev->name );
 566
 567                /* if state & FL_NEED_RESEND != 0 then tx_frameno != 0 */
 568                if( req_ans  ||  nl->tx_frameno != 0 )
 569                        send_frame( dev );
 570                else
 571                        /* send marker without any data */
 572                        outb( inb( ioaddr + CSR0 ) & ~TR_REQ, ioaddr + CSR0 );
 573        }
 574
 575        outb( inb( ioaddr + CSR0 ) | EN_INT, ioaddr + CSR0 );
 576
 577#ifdef CONFIG_SBNI_MULTILINE
 578        if( nl->state & FL_SLAVE )
 579                spin_unlock( &((struct net_local *) nl->master->priv)->lock );
 580#endif
 581}
 582
 583
 584/*
 585 * Routine returns 1 if it need to acknoweledge received frame.
 586 * Empty frame received without errors won't be acknoweledged.
 587 */
 588
 589static int
 590recv_frame( struct net_device  *dev )
 591{
Show full sources