From patchwork Sun Jan 30 19:26:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 518281 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0UNUCQb007293 for ; Sun, 30 Jan 2011 23:32:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752788Ab1A3T0q (ORCPT ); Sun, 30 Jan 2011 14:26:46 -0500 Received: from moutng.kundenserver.de ([212.227.126.187]:52672 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751780Ab1A3T0p (ORCPT ); Sun, 30 Jan 2011 14:26:45 -0500 Received: from flocke.fritz.box (p5086E681.dip.t-dialin.net [80.134.230.129]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MQA5P-1PoHUM0zfn-004wCg; Sun, 30 Jan 2011 20:26:37 +0100 Received: from stefan by flocke.fritz.box with local (Exim 4.72) (envelope-from ) id 1Pjcuy-0001BV-AM; Sun, 30 Jan 2011 20:26:36 +0100 From: Stefan Weil To: Tony Lindgren Cc: Stefan Weil , Russell King , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm: Fix possible memory leak Date: Sun, 30 Jan 2011 20:26:27 +0100 Message-Id: <1296415587-4524-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.2.3 X-Provags-ID: V02:K0:ph9aPENEho6JDKJBvClgf9tMFJFAzYNno4i7kdVHfKW rH3bun/6wLbcx3hD7fh1Qz5MpQpIhwQMDh1uQsDzwfAKSJiFMY jb+yWpb+urr1vj2jLEbQl3n8fRsGroMdobY5j/yZl2cayboQlj 9gUigSCE5U3pjMBZZQne7yC53XYOjJG6vz2ByJNXOQnuVNHFUf KRdztIuj+t9qBUBXdyyNkpXhpV1DOnJ6Uk8u53DU5n/npavRTP HieQqmmpA8/Ae Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 30 Jan 2011 23:32:02 +0000 (UTC) diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index af39d17..07324607 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -832,7 +832,8 @@ static int __init omap_sr_probe(struct platform_device *pdev) if (!pdata) { dev_err(&pdev->dev, "%s: platform data missing\n", __func__); - return -EINVAL; + ret = -EINVAL; + goto err_free_devinfo; } mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);