Re: [patch 1/4] PNP: make pnp_{port,mem,etc}_start(), et al workfor invalid resources

From: Rene Herman
Date: Mon May 19 2008 - 19:23:31 EST


On 16-05-08 00:07, Bjorn Helgaas wrote:

Some callers use pnp_port_start() and similar functions without
making sure the resource is valid. This patch makes us fall
back to returning the initial values if the resource is not
valid or not even present.

This mostly preserves the previous behavior, where we would just
return the initial values set by pnp_init_resource_table(). The
original 2.6.25 code didn't range-check the "bar", so it would
return garbage if the bar exceeded the table size. This code
returns sensible values instead.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@xxxxxx>

Acked-by: Rene Herman <rene.herman@xxxxxxxxx>

Rene.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/