Skip to content

Commit 52c4dfc

Browse files
Madhumithagregkh
authored andcommitted
Staging: vc04_services: Cleanup in ctrl_set_bitrate()
Remove unnecessary variable from the function and make a corresponding change w.r.t the variable. In addition to that align the parameters in the parentheses to maintain Linux kernel coding style Issue suggested by Coccinelle. Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 06e8c28 commit 52c4dfc

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

  • drivers/staging/vc04_services/bcm2835-camera

‎drivers/staging/vc04_services/bcm2835-camera/controls.c‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -607,18 +607,15 @@ static int ctrl_set_bitrate(struct bm2835_mmal_dev *dev,
607607
struct v4l2_ctrl *ctrl,
608608
const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl)
609609
{
610-
int ret;
611610
struct vchiq_mmal_port *encoder_out;
612611

613612
dev->capture.encode_bitrate = ctrl->val;
614613

615614
encoder_out = &dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->output[0];
616615

617-
ret = vchiq_mmal_port_parameter_set(dev->instance, encoder_out,
618-
mmal_ctrl->mmal_id,
619-
&ctrl->val, sizeof(ctrl->val));
620-
ret = 0;
621-
return ret;
616+
return vchiq_mmal_port_parameter_set(dev->instance, encoder_out,
617+
mmal_ctrl->mmal_id, &ctrl->val,
618+
sizeof(ctrl->val));
622619
}
623620

624621
static int ctrl_set_bitrate_mode(struct bm2835_mmal_dev *dev,

0 commit comments

Comments
 (0)