Re: [PATCH 11/16] usb/gadget: fix error path in uvc_function_bind()

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

 



Hi Bhupesh,

On Tuesday 08 January 2013 12:00:43 Bhupesh SHARMA wrote:
> On Tuesday, January 08, 2013 2:13 AM Laurent Pinchart wrote:
> > On Wednesday 31 October 2012 15:06:54 Felipe Balbi wrote:
> > > On Mon, Oct 22, 2012 at 10:15:05PM +0200, Sebastian Andrzej Siewior
> > wrote:
> > > > The "video->minor = -1" assigment is done in V4L2 by
> > > > video_register_device() so it is removed here.
> > > > Now. uvc_function_bind() calls in error case uvc_function_unbind()
> > > > for cleanup. The problem is that uvc_function_unbind() frees the uvc
> > > > struct and uvc_bind_config() does as well in error case of
> > > > usb_add_function().
> > > >
> > > > Removing kfree() in usb_add_function() would make the patch smaller
> > > > but it would look odd because the new allocated memory is not cleaned
> > > > up.
> > > >
> > > > However it is not guaranteed that if we call usb_add_function() we
> > > > also get to the bind function.
> > > > Therefore the patch extracts the conditional cleanup from
> > > > uvc_function_unbind() applies to uvc_function_bind().
> > > > uvc_function_unbind() now contains only the complete cleanup which
> > > > is required once everything has been registrated.
> > > > 
> > > > Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> > > > Cc: Bhupesh Sharma <bhupesh.sharma@xxxxxx>
> > > > Cc: stable <stable@xxxxxxxxxxxxxxx>
> > > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> > > 
> > > this has been soaking for long enough and no replies from either
> > > Laurent or Bhupesh. I'm already applying this series, if there is
> > > something wrong it will have to be a patch on top of my gadget branch.
> > 
> > Sorry for the too long silence. I would have isolated the common code in a
> > separate function, but that's too late now. It doesn't matter too much
> > though.
> > 
> > Bhupesh, do you plan to test my UVC gadget patches with USB 3, or should
> > we drop the USB 3 patches completely ?
> 
> Your USB3 patches break the UVC gadget enumeration with a USB3 host.
> I would like to send a patchset based on your patchset itself that should
> solve the issue, I am in the process of preparing and testing it.
> 
> I know I am extremely late in working on this UVC patchsets, but I have too
> much on my plate for the moment. I will try to send the patches by this
> weekend.
> 
> Sorry for the delay..

No worries, I perfectly understand that. All I wanted to know was whether you 
were still interested in USB3 support for the UVC gadget driver. I'm glad that 
you are :-)

I will be on holidays next week (likely without an internet connection), so 
there's no issue if you delay the patches by one week.

-- 
Regards,

Laurent Pinchart

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux