bool need_to_enqueue_buffer = false;
        int i;
 
-       if (!asd) {
-               dev_err(pipe->isp->dev, "%s(): asd is NULL, device is %s\n",
-                       __func__, pipe->vdev.name);
-               return;
-       }
-
        lockdep_assert_held(&asd->isp->mutex);
 
        /*
        struct atomisp_css_params *css_param = &asd->params.css_param;
        int ret;
 
-       if (!asd) {
-               dev_err(pipe->isp->dev, "%s(): asd is NULL, device is %s\n",
-                       __func__, vdev->name);
-               return -EINVAL;
-       }
-
        lockdep_assert_held(&asd->isp->mutex);
 
        if (!asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream) {
        const struct atomisp_in_fmt_conv *fc = NULL;
        int ret, i;
 
-       if (!asd) {
-               dev_err(isp->dev, "%s(): asd is NULL, device is %s\n",
-                       __func__, vdev->name);
-               return -EINVAL;
-       }
-
        isp_sink_crop = atomisp_subdev_get_rect(
                            &asd->subdev, NULL, V4L2_SUBDEV_FORMAT_ACTIVE,
                            ATOMISP_SUBDEV_PAD_SINK, V4L2_SEL_TGT_CROP);
            (struct atomisp_input_stream_info *)ffmt->reserved;
        int ret;
 
-       if (!asd) {
-               dev_err(pipe->isp->dev, "%s(): asd is NULL, device is %s\n",
-                       __func__, vdev->name);
-               return -EINVAL;
-       }
-
        format = atomisp_get_format_bridge(f->pixelformat);
        if (!format)
                return -EINVAL;