From ff73b80d64bb2d3324ae85c3b7e953a0a17d7171 Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Sat, 10 May 2014 12:47:15 +0200 Subject: 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 Signed-off-by: Rafael J. Wysocki --- drivers/pnp/resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/pnp') diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index 01712cbfd92e..782e82289571 100644 --- a/drivers/pnp/resource.c +++ b/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 */ -- cgit v1.2.3-59-g8ed1b