From patchwork Thu May 23 15:25:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 17147 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f197.google.com (mail-gg0-f197.google.com [209.85.161.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E83282395B for ; Thu, 23 May 2013 15:26:47 +0000 (UTC) Received: by mail-gg0-f197.google.com with SMTP id u1sf3679549ggn.0 for ; Thu, 23 May 2013 08:25:52 -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=n4IzijSsajHxN3BP9AWB1M6K0oadRNlFuRcYgMC3eRw=; b=hHCL0OukHIYHbd5K3pjxlm09u8HrD2aDg790LOdcnHsvgmJzB5nA6vD0a6AeAW+sDq VvF2RMTzxzHJxOkdGvf9d7uWyKB7BmcaO20JEZEQV2mwqbW/ZQ8ON3oxEERTxpv2vYb9 MQmzGHnd1br+zg+8TxHWlicmQoJNBjxHx9ezpWFsYZ5kkF3TF0h2Nka3pfV6D55H4NnJ NU7CL3OmmwMbu69SCXzo/hxEeRc2sLycZNAkDt2/s6gnylntJ8x6q5l3Rm7YLLp9DIt8 JGOLjwpwFkB3O4qDgycgb8jNpCH1fywvqeUHrBm3LsGM47DyBYwUakrFTePmHHULaKX9 t53w== X-Received: by 10.236.193.196 with SMTP id k44mr6253348yhn.40.1369322752025; Thu, 23 May 2013 08:25:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.38.66 with SMTP id e2ls1423971qek.19.gmail; Thu, 23 May 2013 08:25:51 -0700 (PDT) X-Received: by 10.52.164.236 with SMTP id yt12mr4788536vdb.128.1369322751824; Thu, 23 May 2013 08:25:51 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id zt2si5575384vdb.50.2013.05.23.08.25.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 08:25:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id gd11so2270061vcb.39 for ; Thu, 23 May 2013 08:25:51 -0700 (PDT) X-Received: by 10.52.69.200 with SMTP id g8mr4766406vdu.4.1369322751697; Thu, 23 May 2013 08:25:51 -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 c10csp57024vcs; Thu, 23 May 2013 08:25:51 -0700 (PDT) X-Received: by 10.204.119.77 with SMTP id y13mr7195011bkq.64.1369322750767; Thu, 23 May 2013 08:25:50 -0700 (PDT) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [2a00:1450:400c:c05::235]) by mx.google.com with ESMTPS id gm7si14714054wib.39.2013.05.23.08.25.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 08:25:50 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::235 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c05::235; Received: by mail-wi0-f181.google.com with SMTP id hi5so2156215wib.8 for ; Thu, 23 May 2013 08:25:50 -0700 (PDT) X-Received: by 10.180.81.169 with SMTP id b9mr44436100wiy.12.1369322750352; Thu, 23 May 2013 08:25:50 -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.48 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 08:25:49 -0700 (PDT) From: Lee Jones To: linux-kernel@vger.kernel.org, sameo@linux.intel.com Cc: Lee Jones Subject: [PATCH 13/16] mfd: htc-pasic3: Convert to managed resources for allocating memory Date: Thu, 23 May 2013 16:25:14 +0100 Message-Id: <1369322717-30429-13-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: ALoCoQnGAMmDIGE1j4W6B1eCXjrkvfXRilKF1vScj/pxecnBiNZCALHt8RmO0tVqLLJTfc7lZTys X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 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/htc-pasic3.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/htc-pasic3.c b/drivers/mfd/htc-pasic3.c index 0285fce..0a5e85f 100644 --- a/drivers/mfd/htc-pasic3.c +++ b/drivers/mfd/htc-pasic3.c @@ -147,7 +147,7 @@ static int __init pasic3_probe(struct platform_device *pdev) if (!request_mem_region(r->start, resource_size(r), "pasic3")) return -EBUSY; - asic = kzalloc(sizeof(struct pasic3_data), GFP_KERNEL); + asic = devm_kzalloc(dev, sizeof(struct pasic3_data), GFP_KERNEL); if (!asic) return -ENOMEM; @@ -156,7 +156,6 @@ static int __init pasic3_probe(struct platform_device *pdev) asic->mapping = ioremap(r->start, resource_size(r)); if (!asic->mapping) { dev_err(dev, "couldn't ioremap PASIC3\n"); - kfree(asic); return -ENOMEM; } @@ -195,7 +194,6 @@ static int pasic3_remove(struct platform_device *pdev) iounmap(asic->mapping); r = platform_get_resource(pdev, IORESOURCE_MEM, 0); release_mem_region(r->start, resource_size(r)); - kfree(asic); return 0; }