aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-09-01 12:33:09 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-05 15:41:57 -0400
commit9250dd5738ca2f2728913fefc6573daf5b95efa4 (patch)
treeb52ecd7a3313bac45505946f1eaeafd927e3bc66 /drivers
parentd3dec96e401cc66d7280732558d711ac2ee7a531 (diff)
drivers/tty/serial/sirfsoc_uart.c: drop frees of devm_ alloc'd data
devm free functions should not have to be explicitly used. A semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ @@ ( * devm_kfree(...); | * devm_free_irq(...); | * devm_iounmap(...); | * devm_release_region(...); | * devm_release_mem_region(...); ) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/sirfsoc_uart.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index 5b3eda2024fe..a9e2bd1ab534 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -668,7 +668,7 @@ int sirfsoc_uart_probe(struct platform_device *pdev)
668 if (res == NULL) { 668 if (res == NULL) {
669 dev_err(&pdev->dev, "Insufficient resources.\n"); 669 dev_err(&pdev->dev, "Insufficient resources.\n");
670 ret = -EFAULT; 670 ret = -EFAULT;
671 goto irq_err; 671 goto err;
672 } 672 }
673 port->irq = res->start; 673 port->irq = res->start;
674 674
@@ -676,7 +676,7 @@ int sirfsoc_uart_probe(struct platform_device *pdev)
676 sirfport->p = pinctrl_get_select_default(&pdev->dev); 676 sirfport->p = pinctrl_get_select_default(&pdev->dev);
677 ret = IS_ERR(sirfport->p); 677 ret = IS_ERR(sirfport->p);
678 if (ret) 678 if (ret)
679 goto pin_err; 679 goto err;
680 } 680 }
681 681
682 port->ops = &sirfsoc_uart_ops; 682 port->ops = &sirfsoc_uart_ops;
@@ -695,9 +695,6 @@ port_err:
695 platform_set_drvdata(pdev, NULL); 695 platform_set_drvdata(pdev, NULL);
696 if (sirfport->hw_flow_ctrl) 696 if (sirfport->hw_flow_ctrl)
697 pinctrl_put(sirfport->p); 697 pinctrl_put(sirfport->p);
698pin_err:
699irq_err:
700 devm_iounmap(&pdev->dev, port->membase);
701err: 698err:
702 return ret; 699 return ret;
703} 700}
@@ -709,7 +706,6 @@ static int sirfsoc_uart_remove(struct platform_device *pdev)
709 platform_set_drvdata(pdev, NULL); 706 platform_set_drvdata(pdev, NULL);
710 if (sirfport->hw_flow_ctrl) 707 if (sirfport->hw_flow_ctrl)
711 pinctrl_put(sirfport->p); 708 pinctrl_put(sirfport->p);
712 devm_iounmap(&pdev->dev, port->membase);
713 uart_remove_one_port(&sirfsoc_uart_drv, port); 709 uart_remove_one_port(&sirfsoc_uart_drv, port);
714 return 0; 710 return 0;
715} 711}