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>] [day] [month] [year] [list]
Date:	Sat, 23 Mar 2013 16:30:23 +0530
From:	"Vishwanathrao Badarkhe, Manish" <manishv.b@...com>
To:	<devicetree-discuss@...ts.ozlabs.org>,
	<linux-input@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:	<dmitry.torokhov@...il.com>, <wfp5p@...ginia.edu>,
	<broonie@...nsource.wolfsonmicro.com>,
	<u.kleine-koenig@...gutronix.de>, <rmk+kernel@....linux.org.uk>,
	<manishv.b@...com>
Subject: [PATCH] tps6507x-ts: update to devm_* API

Update the code to use devm_* API so that driver
core will manage resources.

Signed-off-by: Vishwanathrao Badarkhe, Manish <manishv.b@...com>
---
:100644 100644 820a066... 65e0f9a... M	drivers/input/touchscreen/tps6507x-ts.c
 drivers/input/touchscreen/tps6507x-ts.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c
index 820a066..65e0f9a 100644
--- a/drivers/input/touchscreen/tps6507x-ts.c
+++ b/drivers/input/touchscreen/tps6507x-ts.c
@@ -261,7 +261,7 @@ static int tps6507x_ts_probe(struct platform_device *pdev)
 
 	init_data = tps_board->tps6507x_ts_init_data;
 
-	tsc = kzalloc(sizeof(struct tps6507x_ts), GFP_KERNEL);
+	tsc = devm_kzalloc(&pdev->dev, sizeof(struct tps6507x_ts), GFP_KERNEL);
 	if (!tsc) {
 		dev_err(tps6507x_dev->dev, "failed to allocate driver data\n");
 		error = -ENOMEM;
@@ -339,7 +339,6 @@ err2:
 	cancel_delayed_work_sync(&tsc->work);
 	input_free_device(input_dev);
 err1:
-	kfree(tsc);
 	tps6507x_dev->ts = NULL;
 err0:
 	return error;
@@ -356,7 +355,6 @@ static int tps6507x_ts_remove(struct platform_device *pdev)
 	input_unregister_device(input_dev);
 
 	tps6507x_dev->ts = NULL;
-	kfree(tsc);
 
 	return 0;
 }
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ