lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB904C5425BA6F4E8424B3B51A1414D16F258A5B28@NWD2CMBX1.ad.analog.com>
Date:	Mon, 26 Mar 2012 22:42:20 -0400
From:	"Zhang, Sonic" <Sonic.Zhang@...log.com>
To:	Axel Lin <axel.lin@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:	Liam Girdwood <lrg@...com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: RE: [PATCH 2/2] regulator: ad5398: Use devm_kzalloc

Acked-by: Sonic Zhang <sonic.zhang@...log.com>

-----Original Message-----
From: Axel Lin [mailto:axel.lin@...il.com]
Sent: Tuesday, March 27, 2012 10:10 AM
To: linux-kernel@...r.kernel.org
Cc: Zhang, Sonic; Liam Girdwood; Mark Brown
Subject: [PATCH 2/2] regulator: ad5398: Use devm_kzalloc

Signed-off-by: Axel Lin <axel.lin@...il.com>
---
 drivers/regulator/ad5398.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c
index ed58798..7d51793 100644
--- a/drivers/regulator/ad5398.c
+++ b/drivers/regulator/ad5398.c
@@ -220,7 +220,7 @@ static int __devinit ad5398_probe(struct i2c_client *client,
        if (!init_data)
                return -EINVAL;

-       chip = kzalloc(sizeof(*chip), GFP_KERNEL);
+       chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
        if (!chip)
                return -ENOMEM;

@@ -246,7 +246,6 @@ static int __devinit ad5398_probe(struct i2c_client *client,
        return 0;

 err:
-       kfree(chip);
        return ret;
 }

@@ -255,8 +254,6 @@ static int __devexit ad5398_remove(struct i2c_client *client)
        struct ad5398_chip_info *chip = i2c_get_clientdata(client);

        regulator_unregister(chip->rdev);
-       kfree(chip);
-
        return 0;
 }

--
1.7.5.4




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ