Skip to content

Commit ff73b80

Browse files
Fabian Frederickrafaeljw
authored andcommitted
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>
1 parent d6d211d commit ff73b80

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/pnp/resource.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ int pnp_check_irq(struct pnp_dev *dev, struct resource *res)
360360
return 1;
361361

362362
/* check if the resource is valid */
363-
if (*irq < 0 || *irq > 15)
363+
if (*irq > 15)
364364
return 0;
365365

366366
/* check if the resource is reserved */
@@ -424,7 +424,7 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
424424
return 1;
425425

426426
/* check if the resource is valid */
427-
if (*dma < 0 || *dma == 4 || *dma > 7)
427+
if (*dma == 4 || *dma > 7)
428428
return 0;
429429

430430
/* check if the resource is reserved */

0 commit comments

Comments
 (0)