Re: [Intel-gfx] [PATCH 23/52] drm: manage drm_minor cleanup with drmm_

2020-02-19 Thread Daniel Vetter
On Wed, Feb 19, 2020 at 3:47 PM Laurent Pinchart wrote: > > Hi Daniel, > > Thank you for the patch. > > On Wed, Feb 19, 2020 at 11:20:53AM +0100, Daniel Vetter wrote: > > The cleanup here is somewhat tricky, since we can't tell apart the > > allocated minor index from 0. So register a cleanup acti

Re: [Intel-gfx] [PATCH 23/52] drm: manage drm_minor cleanup with drmm_

2020-02-19 Thread Laurent Pinchart
Hi Daniel, Thank you for the patch. On Wed, Feb 19, 2020 at 11:20:53AM +0100, Daniel Vetter wrote: > The cleanup here is somewhat tricky, since we can't tell apart the > allocated minor index from 0. So register a cleanup action first, and > if the index allocation fails, unregister that cleanup

[Intel-gfx] [PATCH 23/52] drm: manage drm_minor cleanup with drmm_

2020-02-19 Thread Daniel Vetter
The cleanup here is somewhat tricky, since we can't tell apart the allocated minor index from 0. So register a cleanup action first, and if the index allocation fails, unregister that cleanup action again to avoid bad mistakes. The kdev for the minor already handles NULL, so no problem there. Hen