[media] davinci: vpbe: fix missing unlock on error in vpbe_initialize()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 22 Oct 2012 04:36:13 +0000 (01:36 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 5 Feb 2013 16:26:08 +0000 (14:26 -0200)
Add the missing unlock on the error handling path in function
vpbe_initialize().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Prabhakar Lad <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/davinci/vpbe.c

index 4d9469733fd93b2e54fd92121e81fa46092d4414..4ca0f9a2ad8a76ae07d4c463e18115b0ee2ce09c 100644 (file)
@@ -631,8 +631,10 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
 
        err = bus_for_each_dev(&platform_bus_type, NULL, vpbe_dev,
                               platform_device_get);
-       if (err < 0)
-               return err;
+       if (err < 0) {
+               ret = err;
+               goto fail_dev_unregister;
+       }
 
        vpbe_dev->venc = venc_sub_dev_init(&vpbe_dev->v4l2_dev,
                                           vpbe_dev->cfg->venc.module_name);