Re: [PATCH 2/3] drivers/media/media-entity: clear media_gobj.mdev in _destroy()

2016-06-17 Thread Max Kellermann
On 2016/06/17 14:53, Sakari Ailus wrote: > On Wed, Jun 15, 2016 at 10:15:07PM +0200, Max Kellermann wrote: > > media_gobj_destroy() may be called twice on one instance - once by > > media_device_unregister() and again by dvb_media_device_free(). The > > Is that something

Re: [PATCH 2/3] drivers/media/media-entity: clear media_gobj.mdev in _destroy()

2016-06-17 Thread Sakari Ailus
Hi Max, On Wed, Jun 15, 2016 at 10:15:07PM +0200, Max Kellermann wrote: > media_gobj_destroy() may be called twice on one instance - once by > media_device_unregister() and again by dvb_media_device_free(). The Is that something that should really happen, and why? The same object should not be

Re: [PATCH 2/3] drivers/media/media-entity: clear media_gobj.mdev in _destroy()

2016-06-16 Thread Shuah Khan
On 06/16/2016 12:43 PM, Max Kellermann wrote: > On 2016/06/16 18:24, Shuah Khan wrote: >> On 06/15/2016 02:15 PM, Max Kellermann wrote: >>> media_gobj_destroy() may be called twice on one instance - once by >>> media_device_unregister() and again by

Re: [PATCH 2/3] drivers/media/media-entity: clear media_gobj.mdev in _destroy()

2016-06-16 Thread Max Kellermann
On 2016/06/16 18:24, Shuah Khan wrote: > On 06/15/2016 02:15 PM, Max Kellermann wrote: > > media_gobj_destroy() may be called twice on one instance - once by > > media_device_unregister() and again by dvb_media_device_free(). The > > function media_remove_intf_links()

Re: [PATCH 2/3] drivers/media/media-entity: clear media_gobj.mdev in _destroy()

2016-06-16 Thread Shuah Khan
On 06/15/2016 02:15 PM, Max Kellermann wrote: > media_gobj_destroy() may be called twice on one instance - once by > media_device_unregister() and again by dvb_media_device_free(). The > function media_remove_intf_links() establishes and documents the > convention that mdev==NULL means that the

[PATCH 2/3] drivers/media/media-entity: clear media_gobj.mdev in _destroy()

2016-06-15 Thread Max Kellermann
media_gobj_destroy() may be called twice on one instance - once by media_device_unregister() and again by dvb_media_device_free(). The function media_remove_intf_links() establishes and documents the convention that mdev==NULL means that the object is not registered, but nobody ever NULLs this