diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-10-06 14:17:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-07 13:22:32 -0400 |
commit | 08dc41696ad7f3f8bcb2ea8cb97935a6e79a1bd7 (patch) | |
tree | f3643293843c8f03f148fd9e080b961c0575d4ae /drivers/char | |
parent | 1f6684235825684b6257b7169b122011494c8a4d (diff) | |
download | linux-08dc41696ad7f3f8bcb2ea8cb97935a6e79a1bd7.tar.gz linux-08dc41696ad7f3f8bcb2ea8cb97935a6e79a1bd7.tar.bz2 linux-08dc41696ad7f3f8bcb2ea8cb97935a6e79a1bd7.zip |
ipmi/of: Don't use unavailable interfaces
If an IPMI controller is used by the firmware and as such marked with
a reserved status, we shouldn't use it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 5d665680ae33..4fc89310bfb5 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -2658,6 +2658,9 @@ static int ipmi_probe(struct platform_device *dev) if (!match) return -EINVAL; + if (!of_device_is_available(np)) + return -EINVAL; + ret = of_address_to_resource(np, 0, &resource); if (ret) { dev_warn(&dev->dev, PFX "invalid address from OF\n"); |