if (np)
                        continue;
 
-               if (pdata->xclks[i].con_id == NULL &&
-                   pdata->xclks[i].dev_id == NULL)
+               if (!pdata || (pdata->xclks[i].con_id == NULL &&
+                              pdata->xclks[i].dev_id == NULL))
                        continue;
 
                xclk->lookup = kzalloc(sizeof(*xclk->lookup), GFP_KERNEL);
                goto done;
 
        /* Register external entities */
-       for (subdevs = pdata->subdevs; subdevs && subdevs->subdevs; ++subdevs) {
+       for (subdevs = pdata ? pdata->subdevs : NULL;
+            subdevs && subdevs->subdevs; ++subdevs) {
                struct v4l2_subdev *sensor;
 
                sensor = isp_register_subdev_group(isp, subdevs->subdevs);
        int ret;
        int i, m;
 
-       if (pdata == NULL)
-               return -EINVAL;
-
        isp = devm_kzalloc(&pdev->dev, sizeof(*isp), GFP_KERNEL);
        if (!isp) {
                dev_err(&pdev->dev, "could not allocate memory\n");
 
 
        pipe->entities = 0;
 
-       if (video->isp->pdata->set_constraints)
+       if (video->isp->pdata && video->isp->pdata->set_constraints)
                video->isp->pdata->set_constraints(video->isp, true);
        pipe->l3_ick = clk_get_rate(video->isp->clock[ISP_CLK_L3_ICK]);
        pipe->max_rate = pipe->l3_ick;
 err_check_format:
        media_entity_pipeline_stop(&video->video.entity);
 err_pipeline_start:
-       if (video->isp->pdata->set_constraints)
+       if (video->isp->pdata && video->isp->pdata->set_constraints)
                video->isp->pdata->set_constraints(video->isp, false);
        /* The DMA queue must be emptied here, otherwise CCDC interrupts that
         * will get triggered the next time the CCDC is powered up will try to
        video->queue = NULL;
        video->error = false;
 
-       if (video->isp->pdata->set_constraints)
+       if (video->isp->pdata && video->isp->pdata->set_constraints)
                video->isp->pdata->set_constraints(video->isp, false);
        media_entity_pipeline_stop(&video->video.entity);