If zl3073x_dpll_pin_register() fails, the allocated pin is not yet
added to zldpll->pins list. The error path calls
zl3073x_dpll_pins_unregister() which only iterates pins on the list,
so the current pin is leaked. Free the pin before jumping to the error
label.
Additionally move the pin->dpll_pin = NULL assignment in
zl3073x_dpll_pin_register() from err_register to the common
err_pin_get path. When dpll_pin_get() fails, pin->dpll_pin holds an
ERR_PTR value. Without this fix the subsequent zl3073x_dpll_pin_free()
would trigger a spurious WARN because it checks pin->dpll_pin for
non-NULL.
Fixes:
|
||
|---|---|---|
| .. | ||
| zl3073x | ||
| Kconfig | ||
| Makefile | ||
| dpll_core.c | ||
| dpll_core.h | ||
| dpll_netlink.c | ||
| dpll_netlink.h | ||
| dpll_nl.c | ||
| dpll_nl.h | ||