Skip to content
Commit a663bd19 authored by Alexey Sheplyakov's avatar Alexey Sheplyakov Committed by Daniel Lezcano
Browse files

clocksource/drivers/dw_apb_timer_of: Fix probe failure

The driver refuses to probe with -EINVAL since the commit 5d9814df


("clocksource/drivers/dw_apb_timer_of: Add error handling if no clock
available").

Before the driver used to probe successfully if either "clock-freq" or
"clock-frequency" properties has been specified in the device tree.

That commit changed

if (A && B)
	panic("No clock nor clock-frequency property");

into

if (!A && !B)
	return 0;

That's a bug: the reverse of `A && B` is '!A || !B', not '!A && !B'

Signed-off-by: default avatarVadim V. Vlasov <vadim.vlasov@elpitech.ru>
Signed-off-by: default avatarAlexey Sheplyakov <asheplyakov@basealt.ru>
Fixes: 5d9814df

 ("clocksource/drivers/dw_apb_timer_of: Add error handling if no clock available").
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vadim V. Vlasov <vadim.vlasov@elpitech.ru>
Acked-by: default avatarDinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20211109153401.157491-1-asheplyakov@basealt.ru
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent 53e87e3c
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