提交 0ea46e6e 编写于 作者: A Arnd Bergmann 提交者: Greg Kroah-Hartman

serial: mvebu-uart: drop incorrect memset

gcc points out that the length passed into memset here is wrong:

drivers/tty/serial/mvebu-uart.c: In function 'mvebu_uart_probe':
arch/x86/include/asm/string_32.h:324:29: error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size]

Moreover, the structure was allocated with kzalloc a few lines earlier,
so that memset is also unnecessary. Let's drop it to shut up the
compiler warning.

Fixes: 95f78768 ("serial: mvebu-uart: dissociate RX and TX interrupts")
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5de15cc2
......@@ -817,7 +817,6 @@ static int mvebu_uart_probe(struct platform_device *pdev)
}
/* Manage interrupts */
memset(mvuart->irq, 0, UART_IRQ_COUNT);
if (platform_irq_count(pdev) == 1) {
/* Old bindings: no name on the single unamed UART0 IRQ */
irq = platform_get_irq(pdev, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册