In the Linux kernel, the following vulnerability has been resolved:
ASoC: mxs: Fix error handling in mxssgtl5000probe
This function only calls ofnodeput() in the regular path. And it will cause refcount leak in error paths. For example, when codecnp is NULL, saifnp[0] and saif_np[1] are not NULL, it will cause leaks.
ofnodeput() will check if the node pointer is NULL, so we can call it directly to release the refcount of regular pointers.