mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Serge Semin <fancer.lancer@gmail.com>
To: gregkh@linuxfoundation.org, julia.lawall@lip6.fr
Cc: Sergey.Semin@t-platforms.ru, linux-kernel@vger.kernel.org,
	Serge Semin <fancer.lancer@gmail.com>
Subject: [PATCH] eeprom: idt_89hpesx: Discard memory freeing allocated by devm_kmalloc
Date: Thu, 26 Jan 2017 16:00:36 +0300	[thread overview]
Message-ID: <1485435636-10431-1-git-send-email-fancer.lancer@gmail.com> (raw)

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>
---
 drivers/misc/eeprom/idt_89hpesx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/misc/eeprom/idt_89hpesx.c b/drivers/misc/eeprom/idt_89hpesx.c
index 25d47d0..f73fd04 100644
--- a/drivers/misc/eeprom/idt_89hpesx.c
+++ b/drivers/misc/eeprom/idt_89hpesx.c
@@ -1227,9 +1227,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);
 }
 
 /*
-- 
2.6.6

                 reply	other threads:[~2017-01-26 13:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1485435636-10431-1-git-send-email-fancer.lancer@gmail.com \
    --to=fancer.lancer@gmail.com \
    --cc=Sergey.Semin@t-platforms.ru \
    --cc=gregkh@linuxfoundation.org \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome