Message ID | 20200921131038.92204-1-miaoqinglang@huawei.com |
---|---|
State | Accepted |
Commit | 98d4351847bb45d956722f81f4948aebf3b8df2d |
Headers | show |
Series | [-next] media: venus: simplify the return expression of session_process_buf() | expand |
On Mon 21 Sep 08:10 CDT 2020, Qinglang Miao wrote: > Simplify the return expression. > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> > Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> > --- > drivers/media/platform/qcom/venus/helpers.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c > index 50439eb1f..fb3fd3640 100644 > --- a/drivers/media/platform/qcom/venus/helpers.c > +++ b/drivers/media/platform/qcom/venus/helpers.c > @@ -439,7 +439,6 @@ session_process_buf(struct venus_inst *inst, struct vb2_v4l2_buffer *vbuf) > struct vb2_buffer *vb = &vbuf->vb2_buf; > unsigned int type = vb->type; > struct hfi_frame_data fdata; > - int ret; > > memset(&fdata, 0, sizeof(fdata)); > fdata.alloc_len = buf->size; > @@ -470,11 +469,7 @@ session_process_buf(struct venus_inst *inst, struct vb2_v4l2_buffer *vbuf) > fdata.offset = 0; > } > > - ret = hfi_session_process_buf(inst, &fdata); > - if (ret) > - return ret; > - > - return 0; > + return hfi_session_process_buf(inst, &fdata); > } > > static bool is_dynamic_bufmode(struct venus_inst *inst) > -- > 2.23.0 >
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 50439eb1f..fb3fd3640 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -439,7 +439,6 @@ session_process_buf(struct venus_inst *inst, struct vb2_v4l2_buffer *vbuf) struct vb2_buffer *vb = &vbuf->vb2_buf; unsigned int type = vb->type; struct hfi_frame_data fdata; - int ret; memset(&fdata, 0, sizeof(fdata)); fdata.alloc_len = buf->size; @@ -470,11 +469,7 @@ session_process_buf(struct venus_inst *inst, struct vb2_v4l2_buffer *vbuf) fdata.offset = 0; } - ret = hfi_session_process_buf(inst, &fdata); - if (ret) - return ret; - - return 0; + return hfi_session_process_buf(inst, &fdata); } static bool is_dynamic_bufmode(struct venus_inst *inst)
Simplify the return expression. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> --- drivers/media/platform/qcom/venus/helpers.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)