[PATCH v6 08/17] media: rkisp1: add capture device driver
Tomasz Figa
tfiga at chromium.org
Tue Apr 17 01:44:14 PDT 2018
Hi Jacob,
On Thu, Mar 8, 2018 at 6:49 PM Jacob Chen <jacob-chen at iotwrt.com> wrote:
> From: Jacob Chen <jacob2.chen at rock-chips.com>
> This is the capture device interface driver that provides the v4l2
> user interface. Frames can be received from ISP1.
Thanks for the patch. Please find my comment inline.
[snip]
> +static int
> +rkisp1_start_streaming(struct vb2_queue *queue, unsigned int count)
> +{
> + struct rkisp1_stream *stream = queue->drv_priv;
> + struct rkisp1_vdev_node *node = &stream->vnode;
> + struct rkisp1_device *dev = stream->ispdev;
> + struct v4l2_device *v4l2_dev = &dev->v4l2_dev;
> + int ret;
> +
> + if (WARN_ON(stream->state != RKISP1_STATE_READY))
> + goto return_queued_buf;
We jump out with ret unitialized here. For reference, it triggers a
compiler warning for me.
Note that rather than initializing ret at its definition, I'd recommend
adding an assignment before the goto statement. This will still let the
compiler issue warnings, without assuming that the default value is correct.
Best regards,
Tomasz
More information about the Linux-rockchip
mailing list