From patchwork Thu May 23 15:25:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 17150 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7EFA723976 for ; Thu, 23 May 2013 15:26:52 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id 15sf641737vea.1 for ; Thu, 23 May 2013 08:25:57 -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=jaCtPcoUBgeeT2DKuBpuAxmWeIUlYz8OSCNwWwk7CLw=; b=U0gBgmEYscEB4fMQ4Mnk43/OVcExZDXG0jl+N03UjImRxqcK2DPyMlubqj6+scG/oe veeTVdhSYOPUyWqmzfmDUvIvjy/MMHQvZBs2ha6ZUecC4QRzSMCSo7XF0frmksVGVxCa G240bNEOCjpVJ6Fkxbc2Idkn1cwJDfGK81099cj0S7bv5hF24UstlOrlv4pxLs95BYfa wIDH7CXPFUCMOe+TLvTFfZvuqJ5CJL/0u4/i7CEvE8g+7vFty5H/DKrVuBIWwug2iy8C taf9UV4TYiPg/nOgFknFGvsJydgRMGcX4pySBzbexlcmr97CODx5yrR0w3C37G31tkIT Kxiw== X-Received: by 10.236.146.201 with SMTP id r49mr6036438yhj.27.1369322757177; Thu, 23 May 2013 08:25:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.83.36 with SMTP id n4ls1339696qey.76.gmail; Thu, 23 May 2013 08:25:57 -0700 (PDT) X-Received: by 10.52.156.65 with SMTP id wc1mr1723386vdb.10.1369322756991; Thu, 23 May 2013 08:25:56 -0700 (PDT) Received: from mail-vb0-x22f.google.com (mail-vb0-x22f.google.com [2607:f8b0:400c:c02::22f]) by mx.google.com with ESMTPS id i3si6645070vez.6.2013.05.23.08.25.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 08:25:56 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22f 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:c02::22f; Received: by mail-vb0-f47.google.com with SMTP id x13so2283128vbb.34 for ; Thu, 23 May 2013 08:25:56 -0700 (PDT) X-Received: by 10.52.34.114 with SMTP id y18mr4773176vdi.56.1369322756851; Thu, 23 May 2013 08:25:56 -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 c10csp57031vcs; Thu, 23 May 2013 08:25:56 -0700 (PDT) X-Received: by 10.180.37.229 with SMTP id b5mr44917936wik.29.1369322755968; Thu, 23 May 2013 08:25:55 -0700 (PDT) Received: from mail-wg0-x22b.google.com (mail-wg0-x22b.google.com [2a00:1450:400c:c00::22b]) by mx.google.com with ESMTPS id e10si9246612wiw.16.2013.05.23.08.25.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 08:25:55 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c00::22b is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c00::22b; Received: by mail-wg0-f43.google.com with SMTP id c11so2109955wgh.34 for ; Thu, 23 May 2013 08:25:55 -0700 (PDT) X-Received: by 10.180.86.38 with SMTP id m6mr44508830wiz.25.1369322755484; Thu, 23 May 2013 08:25:55 -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.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 08:25:54 -0700 (PDT) From: Lee Jones To: linux-kernel@vger.kernel.org, sameo@linux.intel.com Cc: Lee Jones Subject: [PATCH 16/16] mfd: max8925: Convert to managed resources for allocating memory Date: Thu, 23 May 2013 16:25:17 +0100 Message-Id: <1369322717-30429-16-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: ALoCoQlNkx88qg/B4quHrE3+2bKko/i+hw4H6Ed5DPELm+m/aab1cPQzNZH6Dwdy/6oz8i6Ba4Rl X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22f 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/max8925-i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c index 92bbebd..8042b32 100644 --- a/drivers/mfd/max8925-i2c.c +++ b/drivers/mfd/max8925-i2c.c @@ -170,7 +170,8 @@ static int max8925_probe(struct i2c_client *client, return -EINVAL; } - chip = kzalloc(sizeof(struct max8925_chip), GFP_KERNEL); + chip = devm_kzalloc(&client->dev, + sizeof(struct max8925_chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; chip->i2c = client; @@ -199,7 +200,6 @@ static int max8925_remove(struct i2c_client *client) max8925_device_exit(chip); i2c_unregister_device(chip->adc); i2c_unregister_device(chip->rtc); - kfree(chip); return 0; }