From: Chanwoo Choi <cwchoi00@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: linux-kernel@vger.kernel.org, cwchoi00@gmail.com,
myungjoo.ham@samsung.com, kyungmin.park@samsung.com
Subject: [PATCH 3/4] extcon: palmas: Fix NULL pointer error
Date: Fri, 19 Jun 2015 15:48:14 +0900 [thread overview]
Message-ID: <1434696495-28131-4-git-send-email-cw00.choi@samsung.com> (raw)
In-Reply-To: <1434696495-28131-1-git-send-email-cw00.choi@samsung.com>
This patch fixes NULL pointer error by removing the unneeded kfree() call
of edev->name because extcon-palmas no longer allocate the memory for edev->name.
Fixes: d71aadda19f8 ("extcon: Remove the optional name of extcon device")
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
drivers/extcon/extcon-palmas.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 080d5cc..4e7335f 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -200,7 +200,6 @@ static int palmas_usb_probe(struct platform_device *pdev)
status = devm_extcon_dev_register(&pdev->dev, palmas_usb->edev);
if (status) {
dev_err(&pdev->dev, "failed to register extcon device\n");
- kfree(palmas_usb->edev->name);
return status;
}
@@ -214,7 +213,6 @@ static int palmas_usb_probe(struct platform_device *pdev)
if (status < 0) {
dev_err(&pdev->dev, "can't get IRQ %d, err %d\n",
palmas_usb->id_irq, status);
- kfree(palmas_usb->edev->name);
return status;
}
}
@@ -229,7 +227,6 @@ static int palmas_usb_probe(struct platform_device *pdev)
if (status < 0) {
dev_err(&pdev->dev, "can't get IRQ %d, err %d\n",
palmas_usb->vbus_irq, status);
- kfree(palmas_usb->edev->name);
return status;
}
}
@@ -241,10 +238,6 @@ static int palmas_usb_probe(struct platform_device *pdev)
static int palmas_usb_remove(struct platform_device *pdev)
{
- struct palmas_usb *palmas_usb = platform_get_drvdata(pdev);
-
- kfree(palmas_usb->edev->name);
-
return 0;
}
--
2.2.0.GIT
next prev parent reply other threads:[~2015-06-19 6:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 6:48 [PATCH 0/4] extcon: Clean-up the minor issue and fix the " Chanwoo Choi
2015-06-19 6:48 ` [PATCH 1/4] extcon: Remove duplicate header file in extcon.h Chanwoo Choi
2015-06-19 6:48 ` [PATCH 2/4] extcon: Remove optional print_state() function pointer of struct extcon_dev Chanwoo Choi
2015-06-19 6:48 ` Chanwoo Choi [this message]
2015-06-22 0:45 ` [PATCH 3/4] extcon: palmas: Fix NULL pointer error Krzysztof Kozlowski
2015-06-22 0:58 ` Chanwoo Choi
2015-06-19 6:48 ` [PATCH 4/4] extcon: palmas: Remove the mutually_exclusive array Chanwoo Choi
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=1434696495-28131-4-git-send-email-cw00.choi@samsung.com \
--to=cwchoi00@gmail.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
/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
all inboxes | Powered by JetHome®