Re: [PATCH v6 08/17] media: rkisp1: add capture device driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jacob,

On Thu, Mar 8, 2018 at 6:49 PM Jacob Chen <jacob-chen@xxxxxxxxxx> wrote:

> From: Jacob Chen <jacob2.chen@xxxxxxxxxxxxxx>

> 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux