Browse Source

PNP / resources: remove positive test on unsigned values

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>
Fabian Frederick 11 years ago
parent
commit
ff73b80d64
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/pnp/resource.c

+ 2 - 2
drivers/pnp/resource.c

@@ -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 */