Re: [PATCH v2 2/5] [media] mt9v032: register v4l2 asynchronous subdevice

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

 



Hi Laurent,

Am Mittwoch, den 04.06.2014, 16:16 +0200 schrieb Laurent Pinchart:
> Hi Philipp,
> 
> Thank you for the patch.
> 
> On Tuesday 03 June 2014 11:35:52 Philipp Zabel wrote:
> > Add support for registering the sensor subdevice using the v4l2-async API.
> > 
> > Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> > ---
> > Changes since v1:
> >  - Fixed cleanup and error handling
> > ---
> >  drivers/media/i2c/mt9v032.c | 13 ++++++++++++-
> >  1 file changed, 12 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/media/i2c/mt9v032.c b/drivers/media/i2c/mt9v032.c
> > index 29d8d8f..83ae8ca6d 100644
> > --- a/drivers/media/i2c/mt9v032.c
> > +++ b/drivers/media/i2c/mt9v032.c
> > @@ -985,10 +985,20 @@ static int mt9v032_probe(struct i2c_client *client,
> > 
> >  	mt9v032->pad.flags = MEDIA_PAD_FL_SOURCE;
> >  	ret = media_entity_init(&mt9v032->subdev.entity, 1, &mt9v032->pad, 0);
> > +	if (ret < 0)
> > +		goto err_entity;
> > 
> > +	mt9v032->subdev.dev = &client->dev;
> > +	ret = v4l2_async_register_subdev(&mt9v032->subdev);
> >  	if (ret < 0)
> > -		v4l2_ctrl_handler_free(&mt9v032->ctrls);
> > +		goto err_async;
> > +
> > +	return 0;
> > 
> > +err_async:
> > +	media_entity_cleanup(&mt9v032->subdev.entity);
> 
> media_entity_cleanup() can safely be called on an unintialized entity, 
> provided the memory has been zeroed. You could thus merge the err_async and 
> err_entity labels into a single error label.

Alright, I'll update this patch accordingly.

regards
Philipp

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux