From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jani Nikula Subject: Re: [RFC PATCH 1/2] drm: store connector name in connector struct Date: Tue, 27 May 2014 09:18:21 +0300 Message-ID: <87mwe3iw2a.fsf@intel.com> References: <881f57fb7f6a7f5ad45e28afbe9d6b2d147c78c4.1400075481.git.jani.nikula@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id C96A96E257 for ; Mon, 26 May 2014 23:18:24 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Dave Airlie Cc: dri-devel List-Id: dri-devel@lists.freedesktop.org On Tue, 27 May 2014, Dave Airlie wrote: >> Reference: http://lkml.kernel.org/r/645ee6e22cad47d38a2b35c21c8d5fe3@DC1-MBX-01.ptsecurity.ru >> Signed-off-by: Jani Nikula > > >> @@ -834,9 +824,17 @@ int drm_connector_init(struct drm_device *dev, >> ida_simple_get(connector_ida, 1, 0, GFP_KERNEL); >> if (connector->connector_type_id < 0) { >> ret = connector->connector_type_id; >> - drm_mode_object_put(dev, &connector->base); >> - goto out; >> + goto out_out; > > ^^ one of these things is not like the other, > > >> } >> + connector->name = >> + kasprintf(GFP_KERNEL, "%s-%d", >> + drm_connector_enum_list[connector_type].name, >> + connector->connector_type_id); >> + if (!connector->name) { >> + ret = -ENOMEM; >> + goto out_put; > > ^^, > > I've merged this fixed into my tree, I'm sure Daniel won't mind :) Thanks. I'll hide behind the "RFC PATCH" subject. ;) BR, Jani. -- Jani Nikula, Intel Open Source Technology Center