]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
eeprom: idt_89hpesx: Discard memory freeing allocated by devm_kmalloc
authorSerge Semin <fancer.lancer@gmail.com>
Thu, 26 Jan 2017 13:00:36 +0000 (16:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jan 2017 08:13:57 +0000 (09:13 +0100)
Indeed, the data structure is allocated by device resource manager,
so the driver doesn't need to free anything on remove() callback.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/eeprom/idt_89hpesx.c

index 4db0d2cb08c6c428fc6b648e08e5cb1c0f6add35..5d48aecbe2082cdcb0935844d15a7f43489f1578 100644 (file)
@@ -1229,9 +1229,6 @@ static void idt_free_pdev(struct idt_89hpesx_dev *pdev)
 {
        /* Clear driver data from device private field */
        i2c_set_clientdata(pdev->client, NULL);
-
-       /* Just free memory allocated for data */
-       devm_kfree(&pdev->client->dev, pdev);
 }
 
 /*