clk: fix possible null pointer dereference