Skip to content

Commit

Permalink
PNP / resources: remove positive test on unsigned values
Browse files Browse the repository at this point in the history
irq and dma are both resource_size_t (derived from phys_addr_t <-> unsigned)

Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
Fabian Frederick authored and rafaeljw committed May 10, 2014
1 parent d6d211d commit ff73b80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pnp/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit ff73b80

Please sign in to comment.