summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-10-06 23:17:51 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-07 21:22:32 +0400
commit08dc41696ad7f3f8bcb2ea8cb97935a6e79a1bd7 (patch)
treef3643293843c8f03f148fd9e080b961c0575d4ae
parent1f6684235825684b6257b7169b122011494c8a4d (diff)
downloadlinux-08dc41696ad7f3f8bcb2ea8cb97935a6e79a1bd7.tar.xz
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>
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c3
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");