diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index 28ad50e424a9e07311b3cf79f125b2ba1a4720fd..7a685cae81ed627a067dfa57d36b3f8c0af04382 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, /* get clock freq. if present */ clk = (u32 *)get_property(np, "clock-frequency", NULL); - clock = clk ? *clk : BASE_BAUD * 16; + if (clk && *clk) + clock = *clk; + else + clock = BASE_BAUD * 16; /* get default speed if present */ spd = (u32 *)get_property(np, "current-speed", NULL);