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>
This commit is contained in:
Serge Semin 2017-01-26 16:00:36 +03:00 committed by Greg Kroah-Hartman
parent 061132d2b9
commit aed74b140e

View 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);
}
/*