OSDN Git Service

treewide: Fix code issues detected using GCC 8
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / drivers / media / platform / msm / vidc / msm_vidc_common.c
index f1004f7..f64c4e9 100644 (file)
@@ -3858,17 +3858,20 @@ int msm_comm_qbuf(struct msm_vidc_inst *inst, struct vb2_buffer *vb)
         * Don't queue if:
         * 1) Hardware isn't ready (that's simple)
         */
-       defer = defer ?: inst->state != MSM_VIDC_START_DONE;
+       if (!defer)
+               defer = inst->state != MSM_VIDC_START_DONE;
 
        /*
         * 2) The client explicitly tells us not to because it wants this
         * buffer to be batched with future frames.  The batch size (on both
         * capabilities) is completely determined by the client.
         */
-       defer = defer ?: vbuf && vbuf->flags & V4L2_MSM_BUF_FLAG_DEFER;
+       if (!defer)
+               defer = vbuf && vbuf->flags & V4L2_MSM_BUF_FLAG_DEFER;
 
        /* 3) If we're in batch mode, we must have full batches of both types */
-       defer = defer ?: batch_mode && (!output_count || !capture_count);
+       if (!defer)
+               defer = batch_mode && (!output_count || !capture_count);
 
        if (defer) {
                dprintk(VIDC_DBG, "Deferring queue of %pK\n", vb);