]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
[media] s5p-mfc: fix state check from encoder queue_setup
[karo-tx-linux.git] / drivers / media / platform / s5p-mfc / s5p_mfc_enc.c
index e65993f4b901d9ee04e49f88247fad6f0917b0f9..2e57e9f45b85e1a19002d60c9a98acde65373c00 100644 (file)
@@ -1819,11 +1819,12 @@ static int s5p_mfc_queue_setup(struct vb2_queue *vq,
        struct s5p_mfc_ctx *ctx = fh_to_ctx(vq->drv_priv);
        struct s5p_mfc_dev *dev = ctx->dev;
 
-       if (ctx->state != MFCINST_GOT_INST) {
-               mfc_err("inavlid state: %d\n", ctx->state);
-               return -EINVAL;
-       }
        if (vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
+               if (ctx->state != MFCINST_GOT_INST) {
+                       mfc_err("inavlid state: %d\n", ctx->state);
+                       return -EINVAL;
+               }
+
                if (ctx->dst_fmt)
                        *plane_count = ctx->dst_fmt->num_planes;
                else