]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PNP / resources: remove positive test on unsigned values
authorFabian Frederick <fabf@skynet.be>
Sat, 10 May 2014 10:47:15 +0000 (12:47 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 10 May 2014 11:46:37 +0000 (13:46 +0200)
irq and dma are both resource_size_t (derived from phys_addr_t <-> unsigned)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pnp/resource.c

index 01712cbfd92e4b64d2f36a5f6410f4fbe730c8c7..782e82289571b219ee0faa695c9d17cefb832c69 100644 (file)
@@ -360,7 +360,7 @@ int pnp_check_irq(struct pnp_dev *dev, struct resource *res)
                return 1;
 
        /* check if the resource is valid */
-       if (*irq < 0 || *irq > 15)
+       if (*irq > 15)
                return 0;
 
        /* check if the resource is reserved */
@@ -424,7 +424,7 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
                return 1;
 
        /* check if the resource is valid */
-       if (*dma < 0 || *dma == 4 || *dma > 7)
+       if (*dma == 4 || *dma > 7)
                return 0;
 
        /* check if the resource is reserved */