Merge "vidc: Add extra cases for error handling in vidc init" into msm-3.0
diff --git a/drivers/video/msm/vidc/common/init/vidc_init.c b/drivers/video/msm/vidc/common/init/vidc_init.c
index f633235..6fdb1c6 100644
--- a/drivers/video/msm/vidc/common/init/vidc_init.c
+++ b/drivers/video/msm/vidc/common/init/vidc_init.c
@@ -285,14 +285,14 @@
if (unlikely(rc)) {
ERR("%s() :request_irq failed\n", __func__);
- goto error_vidc_platfom_register;
+ goto error_vidc_request_irq;
}
res_trk_init(vidc_device_p->device, vidc_device_p->irq);
vidc_timer_wq = create_singlethread_workqueue("vidc_timer_wq");
if (!vidc_timer_wq) {
ERR("%s: create workque failed\n", __func__);
rc = -ENOMEM;
- goto error_vidc_platfom_register;
+ goto error_vidc_create_workqueue;
}
DBG("Disabling IRQ in %s()\n", __func__);
disable_irq_nosync(vidc_device_p->irq);
@@ -315,6 +315,10 @@
#endif
return 0;
+error_vidc_create_workqueue:
+ free_irq(vidc_device_p->irq, vidc_device_p->device);
+error_vidc_request_irq:
+ platform_driver_unregister(&msm_vidc_720p_platform_driver);
error_vidc_platfom_register:
cdev_del(&(vidc_device_p->cdev));
error_vidc_cdev_add: