We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5f96723 + 9e23c81 commit 192fa93Copy full SHA for 192fa93
drivers/media/platform/msm/camera_v1/msm_mctl.c
@@ -878,8 +878,17 @@ static int msm_mctl_dev_close(struct file *f)
878
struct msm_cam_v4l2_device *pcam;
879
struct msm_cam_v4l2_dev_inst *pcam_inst;
880
struct msm_cam_media_controller *pmctl;
881
+
882
+ if (f == NULL) {
883
+ pr_err("%s :: cannot close video driver", __func__);
884
+ return -EINVAL;
885
+ }
886
pcam_inst = container_of(f->private_data,
887
struct msm_cam_v4l2_dev_inst, eventHandle);
888
+ if (!pcam_inst) {
889
+ pr_err("%s NULL pointer of container!\n", __func__);
890
891
892
pcam = pcam_inst->pcam;
893
894
D("%s : E ", __func__);
0 commit comments