summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorSerge Semin <fancer.lancer@gmail.com>2017-01-26 16:00:36 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-27 09:13:57 +0100
commitaed74b140e10725caf8a982ea26610d1dd1f612c (patch)
tree279d9d15aee7d5ae1d666e0f54ef2a0a946a431c /drivers/misc
parent061132d2b9c9504a9f314dcd73f6483a7d8cd1e8 (diff)
downloadlinux-aed74b140e10725caf8a982ea26610d1dd1f612c.tar.bz2
eeprom: idt_89hpesx: Discard memory freeing allocated by devm_kmalloc
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/eeprom/idt_89hpesx.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/misc/eeprom/idt_89hpesx.c b/drivers/misc/eeprom/idt_89hpesx.c
index 4db0d2cb08c6..5d48aecbe208 100644
--- a/drivers/misc/eeprom/idt_89hpesx.c
+++ b/drivers/misc/eeprom/idt_89hpesx.c
@@ -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);
}
/*