Commit 7b994836 authored by Roel Kluin's avatar Roel Kluin Committed by Jesper Nilsson

CRISv10: remove redundant tests on unsigned

Since dmanr is unsigned, negatives are wrapped and caught by the other test.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarJesper Nilsson <jesper.nilsson@axis.com>
parent 768c3149
...@@ -24,7 +24,7 @@ int cris_request_dma(unsigned int dmanr, const char * device_id, ...@@ -24,7 +24,7 @@ int cris_request_dma(unsigned int dmanr, const char * device_id,
unsigned long int gens; unsigned long int gens;
int fail = -EINVAL; int fail = -EINVAL;
if ((dmanr < 0) || (dmanr >= MAX_DMA_CHANNELS)) { if (dmanr >= MAX_DMA_CHANNELS) {
printk(KERN_CRIT "cris_request_dma: invalid DMA channel %u\n", dmanr); printk(KERN_CRIT "cris_request_dma: invalid DMA channel %u\n", dmanr);
return -EINVAL; return -EINVAL;
} }
...@@ -213,7 +213,7 @@ int cris_request_dma(unsigned int dmanr, const char * device_id, ...@@ -213,7 +213,7 @@ int cris_request_dma(unsigned int dmanr, const char * device_id,
void cris_free_dma(unsigned int dmanr, const char * device_id) void cris_free_dma(unsigned int dmanr, const char * device_id)
{ {
unsigned long flags; unsigned long flags;
if ((dmanr < 0) || (dmanr >= MAX_DMA_CHANNELS)) { if (dmanr >= MAX_DMA_CHANNELS) {
printk(KERN_CRIT "cris_free_dma: invalid DMA channel %u\n", dmanr); printk(KERN_CRIT "cris_free_dma: invalid DMA channel %u\n", dmanr);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment