• Tony Lindgren's avatar
    ARM: OMAP2+: Fix error handling for omap2_clk_enable_init_clocks · 339d095a
    Tony Lindgren authored
    We need to check if we got the clock before trying to do anything
    with it. Otherwise we will get something like this:
    
    Unable to handle kernel paging request at virtual address fffffffe
    ...
    [<c04bef78>] (clk_prepare) from [<c00338a4>] (omap2_clk_enable_init_clocks+0x50/0x8)
    [<c00338a4>] (omap2_clk_enable_init_clocks) from [<c0876838>] (dm816x_dt_clk_init+0)
    ...
    
    Let's add check for the clock and WARN if the init clock was not
    found.
    
    Cc: Brian Hutchinson <b.hutchman@gmail.com>
    Cc: Paul Walmsley <paul@pwsan.com>
    Cc: Tero Kristo <t-kristo@ti.com>
    Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    339d095a
clock.c 22.5 KB