summaryrefslogtreecommitdiff
path: root/msm/vidc/msm_v4l2_vidc.c
diff options
context:
space:
mode:
Diffstat (limited to 'msm/vidc/msm_v4l2_vidc.c')
-rw-r--r--msm/vidc/msm_v4l2_vidc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/msm/vidc/msm_v4l2_vidc.c b/msm/vidc/msm_v4l2_vidc.c
index 0fd761e..161661b 100644
--- a/msm/vidc/msm_v4l2_vidc.c
+++ b/msm/vidc/msm_v4l2_vidc.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
*/
#include <linux/debugfs.h>
@@ -490,6 +490,11 @@ static int msm_vidc_probe_vidc_device(struct platform_device *pdev)
return -ENOMEM;
core->platform_data = vidc_get_drv_data(&pdev->dev);
+ if(!core->platform_data) {
+ d_vpr_e("Failed to get platform data\n");
+ rc = -EINVAL;
+ goto err_core_init;
+ }
dev_set_drvdata(&pdev->dev, core);
rc = msm_vidc_initialize_core(pdev, core);
if (rc) {