[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1450199491-30471-5-git-send-email-pebolle@tiscali.nl>
Date: Tue, 15 Dec 2015 18:11:31 +0100
From: Paul Bolle <pebolle@...cali.nl>
To: netdev@...r.kernel.org
Cc: Tilman Schmidt <tilman@...p.cc>, Alan Cox <alan@...ux.intel.com>,
Sasha Levin <sasha.levin@...cle.com>,
Peter Hurley <peter@...leysoftware.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 4/4] ser_gigaset: remove unnecessary kfree() calls from release method
From: Tilman Schmidt <tilman@...p.cc>
device->platform_data and platform_device->resource are never used
and remain NULL through their entire life. Drops the kfree() calls
for them from the device release method.
Signed-off-by: Tilman Schmidt <tilman@...p.cc>
Signed-off-by: Paul Bolle <pebolle@...cali.nl>
---
drivers/isdn/gigaset/ser-gigaset.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c
index 635baaf34e95..2a506fe0c8a4 100644
--- a/drivers/isdn/gigaset/ser-gigaset.c
+++ b/drivers/isdn/gigaset/ser-gigaset.c
@@ -373,13 +373,8 @@ static void gigaset_freecshw(struct cardstate *cs)
static void gigaset_device_release(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
struct cardstate *cs = dev_get_drvdata(dev);
- /* adapted from platform_device_release() in drivers/base/platform.c */
- kfree(dev->platform_data);
- kfree(pdev->resource);
-
if (!cs)
return;
dev_set_drvdata(dev, NULL);
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists