Skip to content
Snippets Groups Projects
Commit ff73b80d authored by Fabian Frederick's avatar Fabian Frederick Committed by Rafael J. Wysocki
Browse files

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: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent d6d211db
No related branches found
No related tags found
No related merge requests found
...@@ -360,7 +360,7 @@ int pnp_check_irq(struct pnp_dev *dev, struct resource *res) ...@@ -360,7 +360,7 @@ int pnp_check_irq(struct pnp_dev *dev, struct resource *res)
return 1; return 1;
/* check if the resource is valid */ /* check if the resource is valid */
if (*irq < 0 || *irq > 15) if (*irq > 15)
return 0; return 0;
/* check if the resource is reserved */ /* check if the resource is reserved */
...@@ -424,7 +424,7 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res) ...@@ -424,7 +424,7 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
return 1; return 1;
/* check if the resource is valid */ /* check if the resource is valid */
if (*dma < 0 || *dma == 4 || *dma > 7) if (*dma == 4 || *dma > 7)
return 0; return 0;
/* check if the resource is reserved */ /* check if the resource is reserved */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment