diff options
Diffstat (limited to 'drivers/pnp/pnpacpi')
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index c0ddb1eb8c4d..dd61e09029b1 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -94,8 +94,8 @@ static void | |||
94 | pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table * res, int dma) | 94 | pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table * res, int dma) |
95 | { | 95 | { |
96 | int i = 0; | 96 | int i = 0; |
97 | while (!(res->dma_resource[i].flags & IORESOURCE_UNSET) && | 97 | while (i < PNP_MAX_DMA && |
98 | i < PNP_MAX_DMA) | 98 | !(res->dma_resource[i].flags & IORESOURCE_UNSET)) |
99 | i++; | 99 | i++; |
100 | if (i < PNP_MAX_DMA) { | 100 | if (i < PNP_MAX_DMA) { |
101 | res->dma_resource[i].flags = IORESOURCE_DMA; // Also clears _UNSET flag | 101 | res->dma_resource[i].flags = IORESOURCE_DMA; // Also clears _UNSET flag |