提交 aed74b14 编写于 作者: S Serge Semin 提交者: Greg Kroah-Hartman

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: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NSerge Semin <fancer.lancer@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 061132d2
......@@ -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);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部