Commit 733bc5b7 authored by Bob Breuer's avatar Bob Breuer Committed by David S. Miller

[SPARC]: Fix crashing of cg14 driver when serial console and vsimm installed.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 450dbdf8
......@@ -469,9 +469,9 @@ static void cg14_init_one(struct sbus_dev *sdev, int node, int parent_node)
int is_8mb, linebytes, i;
if (!sdev) {
prom_getproperty(node, "address",
(char *) &bases[0], sizeof(bases));
if (!bases[0]) {
if (prom_getproperty(node, "address",
(char *) &bases[0], sizeof(bases)) <= 0
|| !bases[0]) {
printk(KERN_ERR "cg14: Device is not mapped.\n");
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment