forked from luck/tmp_suning_uos_patched
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:
parent
061132d2b9
commit
aed74b140e
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user