public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma: imx-dma: fix signedness bug
@ 2010-10-17 14:51 Vasiliy Kulikov
  2010-10-18  8:02 ` Sascha Hauer
  2010-10-19 22:26 ` Dan Williams
  0 siblings, 2 replies; 5+ messages in thread
From: Vasiliy Kulikov @ 2010-10-17 14:51 UTC (permalink / raw)
  To: kernel-janitors; +Cc: Dan Williams, Sascha Hauer, Linus Walleij, linux-kernel

mxdmac->channel was unsigned, so check (imxdmac->channel < 0) for
failed imx_dma_request_by_prio() made no sence.  Explicitly check
signed values.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
 drivers/dma/imx-dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index 346be62..75d870f 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -335,7 +335,7 @@ static int __init imxdma_probe(struct platform_device *pdev)
 
 		imxdmac->imxdma_channel = imx_dma_request_by_prio("dmaengine",
 				DMA_PRIO_MEDIUM);
-		if (imxdmac->channel < 0)
+		if ((int)imxdmac->channel < 0)
 			goto err_init;
 
 		imx_dma_setup_handlers(imxdmac->imxdma_channel,
-- 
1.7.0.4


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

end of thread, other threads:[~2010-10-20  6:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-17 14:51 [PATCH] dma: imx-dma: fix signedness bug Vasiliy Kulikov
2010-10-18  8:02 ` Sascha Hauer
2010-10-19 22:26 ` Dan Williams
2010-10-20  6:35   ` Sascha Hauer
2010-10-20  6:37   ` Sascha Hauer

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