Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd6c7b8b authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Fix possible NULL pointer dereference"

parents a07b243d b91b91be
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);
	vidc_driver->ctxt = kcalloc(core->platform_data->max_inst_count,
		sizeof(*vidc_driver->ctxt), GFP_KERNEL);