[Nouveau] [PATCH] drm/nouveau: fix error handling in core/core object creation functions
Marcin Slusarz
marcin.slusarz at gmail.com
Mon Oct 8 15:50:59 PDT 2012
On Mon, Oct 08, 2012 at 11:05:33AM +1000, Ben Skeggs wrote:
> On Mon, Oct 08, 2012 at 12:49:31AM +0200, Marcin Slusarz wrote:
> > Signed-off-by: Marcin Slusarz <marcin.slusarz at gmail.com>
> > ---
> > This patch relies on "drm/nouveau: remove >1 sclass support from nouveau_parent_create_".
> >
> > There are *many* *more* code paths without proper error handling -
> This is *not* a bug. An object's constructor should be called via
> nouveau_object_ctor(), which has the semantics that the constructor
> returns and error *and* a pointer returned via pobject, then the
> class's destructor will be called to cleanup.
That's... clever, and crazy, and unlike anything in kernel land...
Please put a comment near ctor field in nouveau_ofuncs to make this
information easier to discover, without need to review the whole call chain...
Marcin
More information about the Nouveau
mailing list