Skip to content

Commit

Permalink
tty: serial: Remove call to memset after pci_alloc_consistent
Browse files Browse the repository at this point in the history
pci_alloc_consistent calls dma_alloc_coherent directly.
In commit 518a2f1
("dma-mapping: zero memory returned from dma_alloc_*"),
dma_alloc_coherent has already zeroed the memory.
So memset is not needed.

Signed-off-by: Fuqian Huang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Yellow-Pay authored and gregkh committed Sep 4, 2019
1 parent acf01e6 commit 0998a63
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/tty/serial/icom.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ static int get_port_memory(struct icom_port *icom_port)
return -ENOMEM;
}

memset(icom_port->statStg, 0, 4096);

/* FODs: Frame Out Descriptor Queue, this is a FIFO queue that
indicates that frames are to be transmitted
*/
Expand Down

0 comments on commit 0998a63

Please sign in to comment.