Hi Lukasz,
On Wednesday 18 Nov 2020 at 12:03:56 (+0000), Lukasz Luba wrote:
+ struct device_node *np = NULL;
+
+ if (dev->of_node)
+ np = of_node_get(dev->of_node);
+
Should np be checked before use? I'm not sure if it's better to do the
assign first and then the check on np before use. It depends on the
consequences of passing a NULL node pointer later on.
+ cdev = of_devfreq_cooling_register_power(np, df, dfc_power);
+
+ if (np)
+ of_node_put(np);
+
Otherwise it looks good to me:
Reviewed-by: Ionela Voinescu <ionela.voinescu@xxxxxxx>
Ionela.