diff options
-rw-r--r-- | arch/powerpc/kernel/legacy_serial.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index 28ad50e424a9..7a685cae81ed 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c | |||
@@ -43,7 +43,10 @@ static int __init add_legacy_port(struct device_node *np, int want_index, | |||
43 | 43 | ||
44 | /* get clock freq. if present */ | 44 | /* get clock freq. if present */ |
45 | clk = (u32 *)get_property(np, "clock-frequency", NULL); | 45 | clk = (u32 *)get_property(np, "clock-frequency", NULL); |
46 | clock = clk ? *clk : BASE_BAUD * 16; | 46 | if (clk && *clk) |
47 | clock = *clk; | ||
48 | else | ||
49 | clock = BASE_BAUD * 16; | ||
47 | 50 | ||
48 | /* get default speed if present */ | 51 | /* get default speed if present */ |
49 | spd = (u32 *)get_property(np, "current-speed", NULL); | 52 | spd = (u32 *)get_property(np, "current-speed", NULL); |