]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ser_gigaset: remove unnecessary kfree() calls from release method
authorTilman Schmidt <tilman@imap.cc>
Tue, 15 Dec 2015 17:11:31 +0000 (18:11 +0100)
committerZefan Li <lizefan@huawei.com>
Wed, 26 Oct 2016 15:15:46 +0000 (23:15 +0800)
commit 8aeb3c3d655e22d3aa5ba49f313157bd27354bb4 upstream.

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@imap.cc>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/isdn/gigaset/ser-gigaset.c

index 3cdfcd0019a19e0b56dbe114ed216824fa8a7e0d..9723f4613b7be7fa9baaa6e08ecabd2e4e440c40 100644 (file)
@@ -376,13 +376,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);