summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-10-06 14:17:51 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-07 13:22:32 -0400
commit08dc41696ad7f3f8bcb2ea8cb97935a6e79a1bd7 (patch)
treef3643293843c8f03f148fd9e080b961c0575d4ae /drivers/char
parent1f6684235825684b6257b7169b122011494c8a4d (diff)
downloadop-kernel-dev-08dc41696ad7f3f8bcb2ea8cb97935a6e79a1bd7.zip
op-kernel-dev-08dc41696ad7f3f8bcb2ea8cb97935a6e79a1bd7.tar.gz
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.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 5d66568..4fc8931 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");
OpenPOWER on IntegriCloud