From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751664AbdI1GYH (ORCPT ); Thu, 28 Sep 2017 02:24:07 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:31092 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751355AbdI1GXy (ORCPT ); Thu, 28 Sep 2017 02:23:54 -0400 Subject: Re: [PATCH] drm/omap: Fix error handling path in 'omap_dmm_probe()' To: Christophe JAILLET , CC: , , References: <20170924060103.26604-1-christophe.jaillet@wanadoo.fr> From: Tomi Valkeinen Message-ID: Date: Thu, 28 Sep 2017 09:23:49 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170924060103.26604-1-christophe.jaillet@wanadoo.fr> Content-Type: text/plain; charset="utf-8" Content-Language: en-US X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v8S6OBaq025402  Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki On 24/09/17 09:01, Christophe JAILLET wrote: > If we don't find a matching device node, we must free the memory allocated > in 'omap_dmm' a few lines above. > > Fixes: 7cb0d6c17b96 ("drm/omap: fix TILER on OMAP5") > Signed-off-by: Christophe JAILLET > --- > drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c > index 1dd3dafc59af..c60a85e82c6d 100644 > --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c > +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c > @@ -638,7 +638,8 @@ static int omap_dmm_probe(struct platform_device *dev) > match = of_match_node(dmm_of_match, dev->dev.of_node); > if (!match) { > dev_err(&dev->dev, "failed to find matching device node\n"); > - return -ENODEV; > + ret = -ENODEV; > + goto fail; > } > > omap_dmm->plat_data = match->data; > Thanks! I have picked this up. Tomi