]> Git Repo - linux.git/commitdiff
CRISv10: remove redundant tests on unsigned
authorRoel Kluin <[mailto:[email protected]]>
Tue, 23 Jun 2009 08:04:14 +0000 (10:04 +0200)
committerJesper Nilsson <[email protected]>
Tue, 23 Jun 2009 08:05:05 +0000 (10:05 +0200)
Since dmanr is unsigned, negatives are wrapped and caught by the other test.

Signed-off-by: Roel Kluin <[email protected]>
Acked-by: Jesper Nilsson <[email protected]>
arch/cris/arch-v10/kernel/dma.c

index 929e686662991fd54d4a2bf0dbc899bd1c8a01cf..d31504b4a19e184360fe1916d8a14e670b354557 100644 (file)
@@ -24,7 +24,7 @@ int cris_request_dma(unsigned int dmanr, const char * device_id,
        unsigned long int gens;
        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);
                return -EINVAL;
        }
@@ -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)
 {
        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);
                return;
        }
This page took 0.057954 seconds and 4 git commands to generate.