From patchwork Thu May 23 15:25:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 17141 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 596462395B for ; Thu, 23 May 2013 15:26:36 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id bv4sf4131895qab.6 for ; Thu, 23 May 2013 08:25:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=C13EyhRobCzMwyD6Kn5W2ck9KGvUtJrF9/czMwtVWo8=; b=B+3OU3kbXRIfcxvA1W+/oO26xL5IgdttrADotKxE/blXWTb1BCImUsS58vv2F30Jz0 I1cASQ6SKJKBgcNnoHSF2AQOrvMbrLymhav8QM9Rxotp+vRGjAsbtTT63OCrTp/H5c/E K2o+vVjLXpX6J8H9KzctMyBPnXudVOUERQHMxxkGENIJ8nqTJ4YRKKdwKMH3V4aUGp2j 3GV4rMBtPHISVjX1MROnOabmLxT+bRpla/9/sUa5QWpUiTre08yHh2WSuKxMF9MXc2vD olXH0MBdvijB0l89dfS4YuQaDy1/uiMqlze2ZqDFSMzEmfPMyxGacLb3dwGm38WwlkeG EKeA== X-Received: by 10.236.134.14 with SMTP id r14mr5047117yhi.39.1369322741080; Thu, 23 May 2013 08:25:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.50.197 with SMTP id e5ls1553850qeo.42.gmail; Thu, 23 May 2013 08:25:40 -0700 (PDT) X-Received: by 10.52.230.164 with SMTP id sz4mr4882896vdc.118.1369322740759; Thu, 23 May 2013 08:25:40 -0700 (PDT) Received: from mail-ve0-x231.google.com (mail-ve0-x231.google.com [2607:f8b0:400c:c01::231]) by mx.google.com with ESMTPS id sc6si6646583vdc.34.2013.05.23.08.25.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 08:25:40 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::231; Received: by mail-ve0-f177.google.com with SMTP id ox1so2491822veb.8 for ; Thu, 23 May 2013 08:25:40 -0700 (PDT) X-Received: by 10.58.90.5 with SMTP id bs5mr5507438veb.60.1369322740631; Thu, 23 May 2013 08:25:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.126.138 with SMTP id c10csp57007vcs; Thu, 23 May 2013 08:25:40 -0700 (PDT) X-Received: by 10.181.12.1 with SMTP id em1mr44633407wid.4.1369322739661; Thu, 23 May 2013 08:25:39 -0700 (PDT) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [2a00:1450:400c:c05::229]) by mx.google.com with ESMTPS id s3si9240558wij.30.2013.05.23.08.25.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 08:25:39 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::229 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c05::229; Received: by mail-wi0-f169.google.com with SMTP id hn14so5090921wib.0 for ; Thu, 23 May 2013 08:25:39 -0700 (PDT) X-Received: by 10.180.109.48 with SMTP id hp16mr25554709wib.24.1369322736151; Thu, 23 May 2013 08:25:36 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPSA id d10sm36397561wik.0.2013.05.23.08.25.34 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 08:25:35 -0700 (PDT) From: Lee Jones To: linux-kernel@vger.kernel.org, sameo@linux.intel.com Cc: Lee Jones Subject: [PATCH 05/16] mfd: ab8500-gpadc: Convert to managed resources for allocating memory Date: Thu, 23 May 2013 16:25:06 +0100 Message-Id: <1369322717-30429-5-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1369322717-30429-1-git-send-email-lee.jones@linaro.org> References: <1369322717-30429-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQkApGK3EdePt8XjAMkQswV9R4I59Hn9nlqOvwtNDhpKFVoWtEx7bJtr8PrcCDhGS9yJzQua X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Lee Jones --- drivers/mfd/ab8500-gpadc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c index 13f7866..f1d4565 100644 --- a/drivers/mfd/ab8500-gpadc.c +++ b/drivers/mfd/ab8500-gpadc.c @@ -925,7 +925,7 @@ static int ab8500_gpadc_probe(struct platform_device *pdev) int ret = 0; struct ab8500_gpadc *gpadc; - gpadc = kzalloc(sizeof(struct ab8500_gpadc), GFP_KERNEL); + gpadc = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_gpadc), GFP_KERNEL); if (!gpadc) { dev_err(&pdev->dev, "Error: No memory\n"); return -ENOMEM; @@ -1005,8 +1005,6 @@ fail_irq: free_irq(gpadc->irq_sw, gpadc); free_irq(gpadc->irq_hw, gpadc); fail: - kfree(gpadc); - gpadc = NULL; return ret; } @@ -1031,8 +1029,6 @@ static int ab8500_gpadc_remove(struct platform_device *pdev) pm_runtime_put_noidle(gpadc->dev); - kfree(gpadc); - gpadc = NULL; return 0; }