소스 검색

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>
Serge Semin 8 년 전
부모
커밋
aed74b140e
1개의 변경된 파일0개의 추가작업 그리고 3개의 파일을 삭제
  1. 0 3
      drivers/misc/eeprom/idt_89hpesx.c

+ 0 - 3
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);
 }
 
 /*