aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRakesh Movva2014-07-31 15:13:20 -0500
committerGerrit Code Review2014-08-05 16:19:45 -0500
commit475700abacd2419a9783183ff2f23c8b6c911614 (patch)
tree750822bdffb6e3c0a8420dd9688ac9165297bde1
parent89a59e66c02d1441fb8f51141e18c21c300731ce (diff)
downloadkernel-audio-475700abacd2419a9783183ff2f23c8b6c911614.tar.gz
kernel-audio-475700abacd2419a9783183ff2f23c8b6c911614.tar.xz
kernel-audio-475700abacd2419a9783183ff2f23c8b6c911614.zip
ti-ec: Fix up for vip_open() crash when no camera connected.
Initially there was no check before calling the vip_open in the earlycam driver module. This fix in main_fn() thread function checks whether there is any valid camera device connected before performing any operations on vip. Change-Id: I54a90a09785d8a6b7f06660e6a3e75777fa587d9 Signed-off-by: Rakesh Movva <r-movva@ti.com>
-rw-r--r--drivers/misc/ti-ec/earlycam.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/misc/ti-ec/earlycam.c b/drivers/misc/ti-ec/earlycam.c
index 3cf82ef55c9e..f5f11520ac32 100644
--- a/drivers/misc/ti-ec/earlycam.c
+++ b/drivers/misc/ti-ec/earlycam.c
@@ -359,6 +359,12 @@ int main_fn(void *arg)
359 dtr.d_inode = &in; 359 dtr.d_inode = &in;
360 fp.f_path.dentry = &dtr; 360 fp.f_path.dentry = &dtr;
361 361
362 ret = video_devdata(&fp);
363 if (ret == NULL) {
364 pr_err("Camera device not connected\n");
365 return ret;
366 }
367
362 ret = display_init(); 368 ret = display_init();
363 if (ret) { 369 if (ret) {
364 pr_err("display_init failed with error %d", ret); 370 pr_err("display_init failed with error %d", ret);