From: Egbert Eich Subject: Re: [PATCH 04/16] drm/mgag200: Don't unreference when handle creation failed Date: Wed, 17 Jul 2013 17:55:22 +0200 Message-ID: <20966.48746.98740.901548@linux-qknr.site> References: <1374066449-21714-1-git-send-email-eich@suse.com> <1374066449-21714-5-git-send-email-eich@suse.com> <20130717132857.GC5249@cantiga.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTP id 7228CE5FA6 for ; Wed, 17 Jul 2013 08:55:24 -0700 (PDT) In-Reply-To: chris@chris-wilson.co.uk wrote on Wednesday, 17 July 2013 at 14:28:57 +0100 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: Egbert Eich , Christopher Harvey , Mathieu Larouche , dri-devel@lists.freedesktop.org, Dave Airlie List-Id: dri-devel@lists.freedesktop.org Chris Wilson writes: > On Wed, Jul 17, 2013 at 03:07:17PM +0200, Egbert Eich wrote: > > drm_gem_handle_create() should not have referenced an object when it's > > creation has failed for some reason. > > > > Signed-off-by: Egbert Eich > > Nak. The unreference here is to free the locally created resource before > returning the error to the user. In the case of success, the only > reference to the object that then remains is through the new handle. > -Chris Argh, yeah, you're right. Sorry. Cheers, Egbert.