Showing error 1574

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: 2184
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-29 20:11:37 UTC


Source:

2154        cam->v4ldev.debug = 0;
2155//        cam->v4ldev.debug = V4L2_DEBUG_IOCTL_ARG;
2156        cam->v4ldev.parent = &pdev->dev;
2157        ret = video_register_device(&cam->v4ldev, VFL_TYPE_GRABBER, -1);
2158        if (ret)
2159                goto out_smbus;
2160        /*
2161         * If so requested, try to get our DMA buffers now.
2162         */
2163        if (!alloc_bufs_at_read) {
2164                if (cafe_alloc_dma_bufs(cam, 1))
2165                        cam_warn(cam, "Unable to alloc DMA buffers at load"
2166                                        " will try again later.");
2167        }
2168
2169        cafe_dfs_cam_setup(cam);
2170        mutex_unlock(&cam->s_mutex);
2171        cafe_add_dev(cam);
2172        return 0;
2173
2174  out_smbus:
2175        cafe_smbus_shutdown(cam);
2176  out_freeirq:
2177        cafe_ctlr_power_down(cam);
2178        free_irq(pdev->irq, cam);
2179  out_iounmap:
2180        pci_iounmap(pdev, cam->regs);
2181  out_free:
2182        kfree(cam);
2183  out:
2184        return ret;
2185}
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);
Show full sources