public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: sirf: Simplify a test
@ 2016-11-01  7:03 Christophe JAILLET
  2016-11-07 13:50 ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Christophe JAILLET @ 2016-11-01  7:03 UTC (permalink / raw)
  To: linux-arm-kernel

'dmaengine_prep_dma_cyclic()' does not return an error pointer, so the test
can be simplified to be more consistent.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/tty/serial/sirfsoc_uart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index b186c9c4f850..666ca3156961 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -609,7 +609,7 @@ static void sirfsoc_uart_start_next_rx_dma(struct uart_port *port)
 		sirfport->rx_dma_items.dma_addr, SIRFSOC_RX_DMA_BUF_SIZE,
 		SIRFSOC_RX_DMA_BUF_SIZE / 2,
 		DMA_DEV_TO_MEM, DMA_PREP_INTERRUPT);
-	if (IS_ERR_OR_NULL(sirfport->rx_dma_items.desc)) {
+	if (!sirfport->rx_dma_items.desc) {
 		dev_err(port->dev, "DMA slave single fail\n");
 		return;
 	}
-- 
2.9.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-11-10 21:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-01  7:03 [PATCH] serial: sirf: Simplify a test Christophe JAILLET
2016-11-07 13:50 ` Arnd Bergmann
2016-11-07 17:19   ` Julia Lawall
2016-11-08  7:18   ` Christophe JAILLET
2016-11-08 11:41     ` Arnd Bergmann
2016-11-10 21:18     ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox