mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
clk: at91: pmc: do not continue if compatible not located
pmc_register_ops() is called for all AT91 devices. Return -ENODEV in case of_find_matching_node() returns NULL. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lkml.kernel.org/r/1588508289-10140-1-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
99e107439e
commit
f6363c437d
1 changed files with 2 additions and 0 deletions
|
@ -274,6 +274,8 @@ static int __init pmc_register_ops(void)
|
|||
struct device_node *np;
|
||||
|
||||
np = of_find_matching_node(NULL, sama5d2_pmc_dt_ids);
|
||||
if (!np)
|
||||
return -ENODEV;
|
||||
|
||||
pmcreg = device_node_to_regmap(np);
|
||||
if (IS_ERR(pmcreg))
|
||||
|
|
Loading…
Reference in a new issue