Thu, Jan 04, 2024 at 12:11:32PM CET, arkadiusz.kubalewski@intel.com wrote:
[...]
quoted hunk ↗ jump to hunk
@@ -1179,6 +1195,10 @@ int dpll_nl_pin_set_doit(struct sk_buff *skb, struct genl_info *info)
What about dpll_nl_pin_get_doit(), dpll_nl_pin_id_get_doit()?
I think it would be better to move the check to:
dpll_pin_pre_doit()
{
struct dpll_pin *pin = info->user_ptr[0];
+ if (!xa_empty(&pin->parent_refs) &&
+ !dpll_pin_parents_registered(pin))
+ return -ENODEV;
+
return dpll_pin_set_from_nlattr(pin, info);
}
--
2.38.1