Re: [v4l-utils PATCH 2/2] mediactl: Separate entity and pad parsing

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

 



Hi Laurent,

On Tue, May 24, 2016 at 08:14:22PM +0300, Laurent Pinchart wrote:
...
> > +struct media_pad *media_parse_pad(struct media_device *media,
> > +				  const char *p, char **endp)
> > +{
> > +	unsigned int pad;
> > +	struct media_entity *entity;
> > +	char *end;
> > +
> > +	if (endp == NULL)
> > +		endp = &end;
> > +
> > +	entity = media_parse_entity(media, p, &end);
> > +	if (!entity)
> > +		return NULL;
> > +	*endp = end;
> 
> Did you mean
> 
> 	if (!entity) {
> 		*endp = end;
> 		return NULL;
> 	}
> 
> ? There's no need to assign endp after the check as all return paths below 
> assign it correctly, but it should be set when returning an error here.

Good catch! Yeah, it's a bug, I'll fix that.

-- 
Cheers,

Sakari Ailus
e-mail: sakari.ailus@xxxxxx	XMPP: sailus@xxxxxxxxxxxxxx
--
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