powerpc/powernv: Don't crash if there are no OPAL consoles
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 15 Jul 2013 03:03:14 +0000 (13:03 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 14 Aug 2013 04:58:27 +0000 (14:58 +1000)
commit2db29d28eb100e464cfaf1a2146d0bf58198212d
tree9166c28c6353e87fe8fca69915d2828779c1b81b
parente0f5fa99a378d6910d234f3c8998aebfe2f54745
powerpc/powernv: Don't crash if there are no OPAL consoles

Some machines might provide the console via a different mechanism
such as direct access to a UART from Linux, in which case OPAL
might not expose any console. In that case, the code would cause
a NULL dereference.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/powernv/opal.c