aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2015-06-11 07:19:25 -0400
committerChanwoo Choi <cw00.choi@samsung.com>2015-07-29 04:55:53 -0400
commite350f8045f642dfc4c28a81c57d2103e1f7ceead (patch)
tree972a3b209043dce6c5235ee472c2384468ba5e76 /drivers/extcon
parentcbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f (diff)
extcon: palmas: Fix NULL pointer error
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> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-palmas.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 080d5cc27055..eebdf2a33bfe 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)
200 status = devm_extcon_dev_register(&pdev->dev, palmas_usb->edev); 200 status = devm_extcon_dev_register(&pdev->dev, palmas_usb->edev);
201 if (status) { 201 if (status) {
202 dev_err(&pdev->dev, "failed to register extcon device\n"); 202 dev_err(&pdev->dev, "failed to register extcon device\n");
203 kfree(palmas_usb->edev->name);
204 return status; 203 return status;
205 } 204 }
206 205
@@ -214,7 +213,6 @@ static int palmas_usb_probe(struct platform_device *pdev)
214 if (status < 0) { 213 if (status < 0) {
215 dev_err(&pdev->dev, "can't get IRQ %d, err %d\n", 214 dev_err(&pdev->dev, "can't get IRQ %d, err %d\n",
216 palmas_usb->id_irq, status); 215 palmas_usb->id_irq, status);
217 kfree(palmas_usb->edev->name);
218 return status; 216 return status;
219 } 217 }
220 } 218 }
@@ -229,7 +227,6 @@ static int palmas_usb_probe(struct platform_device *pdev)
229 if (status < 0) { 227 if (status < 0) {
230 dev_err(&pdev->dev, "can't get IRQ %d, err %d\n", 228 dev_err(&pdev->dev, "can't get IRQ %d, err %d\n",
231 palmas_usb->vbus_irq, status); 229 palmas_usb->vbus_irq, status);
232 kfree(palmas_usb->edev->name);
233 return status; 230 return status;
234 } 231 }
235 } 232 }
@@ -239,15 +236,6 @@ static int palmas_usb_probe(struct platform_device *pdev)
239 return 0; 236 return 0;
240} 237}
241 238
242static int palmas_usb_remove(struct platform_device *pdev)
243{
244 struct palmas_usb *palmas_usb = platform_get_drvdata(pdev);
245
246 kfree(palmas_usb->edev->name);
247
248 return 0;
249}
250
251#ifdef CONFIG_PM_SLEEP 239#ifdef CONFIG_PM_SLEEP
252static int palmas_usb_suspend(struct device *dev) 240static int palmas_usb_suspend(struct device *dev)
253{ 241{
@@ -288,7 +276,6 @@ static const struct of_device_id of_palmas_match_tbl[] = {
288 276
289static struct platform_driver palmas_usb_driver = { 277static struct platform_driver palmas_usb_driver = {
290 .probe = palmas_usb_probe, 278 .probe = palmas_usb_probe,
291 .remove = palmas_usb_remove,
292 .driver = { 279 .driver = {
293 .name = "palmas-usb", 280 .name = "palmas-usb",
294 .of_match_table = of_palmas_match_tbl, 281 .of_match_table = of_palmas_match_tbl,