]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - drivers/tty/serial/jsm/jsm_driver.c
jsm: remove remaining flip buffer code
[linux-imx.git] / drivers / tty / serial / jsm / jsm_driver.c
index 96da17868cf3c46bad25d743c4a304e37fca2c30..1cc8cf602af8bde8d62dda0bb55dffd3693b78dd 100644 (file)
@@ -160,27 +160,10 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device
        dev_info(&pdev->dev, "board %d: Digi Neo (rev %d), irq %d\n",
                        adapter_count, brd->rev, brd->irq);
 
-       /*
-        * allocate flip buffer for board.
-        *
-        * Okay to malloc with GFP_KERNEL, we are not at interrupt
-        * context, and there are no locks held.
-        */
-       brd->flipbuf = kzalloc(MYFLIPLEN, GFP_KERNEL);
-       if (!brd->flipbuf) {
-               /* XXX: leaking all resources from jsm_tty_init and
-                       jsm_uart_port_init here! */
-               dev_err(&pdev->dev, "memory allocation for flipbuf failed\n");
-               rc = -ENOMEM;
-               goto out_free_uart;
-       }
-
        pci_set_drvdata(pdev, brd);
        pci_save_state(pdev);
 
        return 0;
- out_free_uart:
-       jsm_remove_uart_port(brd);
  out_free_irq:
        jsm_remove_uart_port(brd);
        free_irq(brd->irq, brd);
@@ -218,7 +201,6 @@ static void __devexit jsm_remove_one(struct pci_dev *pdev)
 
        pci_release_regions(pdev);
        pci_disable_device(pdev);
-       kfree(brd->flipbuf);
        kfree(brd);
 }