• J
    clk: check ops pointer on clock register · 29fd2a34
    Jerome Brunet 提交于
    Nothing really prevents a provider from (trying to) register a clock
    without providing the clock ops structure.
    
    We do check the individual fields before using them, but not the
    structure pointer itself. This may have the usual nasty consequences when
    the pointer is dereferenced, most likely when checking one the field
    during the initialization.
    
    This is fixed by returning an error on clock register if the ops pointer
    is NULL.
    Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
    Signed-off-by: NMichael Turquette <mturquette@baylibre.com>
    Link: lkml.kernel.org/r/20171219083329.24746-1-jbrunet@baylibre.com
    29fd2a34
clk.c 87.3 KB