Showing error 1281

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


Source:

2186
2187
2188/*
2189 * Shut down an initialized device
2190 */
2191static void cafe_shutdown(struct cafe_camera *cam)
2192{
2193/* FIXME: Make sure we take care of everything here */
2194        cafe_dfs_cam_shutdown(cam);
2195        if (cam->n_sbufs > 0)
2196                /* What if they are still mapped?  Shouldn't be, but... */
2197                cafe_free_sio_buffers(cam);
2198        cafe_remove_dev(cam);
2199        cafe_ctlr_stop_dma(cam);
2200        cafe_ctlr_power_down(cam);
2201        cafe_smbus_shutdown(cam);
2202        cafe_free_dma_bufs(cam);
2203        free_irq(cam->pdev->irq, cam);
2204        pci_iounmap(cam->pdev, cam->regs);
2205        video_unregister_device(&cam->v4ldev);
2206        /* kfree(cam); done in v4l_release () */
2207}
2208
2209
2210static void cafe_pci_remove(struct pci_dev *pdev)
2211{
2212        struct cafe_camera *cam = cafe_find_by_pdev(pdev);
2213
2214        if (cam == NULL) {
2215                printk(KERN_WARNING "pci_remove on unknown pdev %p\n", pdev);
2216                return;
2217        }
2218        mutex_lock(&cam->s_mutex);
2219        if (cam->users > 0)
2220                cam_warn(cam, "Removing a device with users!\n");
2221        cafe_shutdown(cam);
2222/* No unlock - it no longer exists */
2223}
2224
2225
2226#ifdef CONFIG_PM
Show full sources