[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAFQd5CF9-T24sw9fPw050G=fPha46DnCb8g6m7V2wtNVx_=1A@mail.gmail.com>
Date: Tue, 17 Apr 2018 08:44:14 +0000
From: Tomasz Figa <tfiga@...omium.org>
To: Jacob Chen <jacob-chen@...wrt.com>
Cc: "open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"list@....net:IOMMU DRIVERS <iommu@...ts.linux-foundation.org>, Joerg
Roedel <joro@...tes.org>," <linux-arm-kernel@...ts.infradead.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Hans Verkuil <hans.verkuil@...co.com>,
Shunqian Zheng <zhengsq@...k-chips.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
钟以崇 <zyc@...k-chips.com>,
Eddie Cai <eddie.cai.linux@...il.com>,
Jeffy <jeffy.chen@...k-chips.com>, devicetree@...r.kernel.org,
Heiko Stübner <heiko@...ech.de>,
Chen Jacob <jacob2.chen@...k-chips.com>,
陈城 <cc@...k-chips.com>,
Allon Huang <allon.huang@...k-chips.com>
Subject: Re: [PATCH v6 08/17] media: rkisp1: add capture device driver
Hi Jacob,
On Thu, Mar 8, 2018 at 6:49 PM Jacob Chen <jacob-chen@...wrt.com> wrote:
> From: Jacob Chen <jacob2.chen@...k-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
Powered by blists - more mailing lists