In the Linux kernel, the following vulnerability has been resolved: net: hns3: make sure ptp clock is unregister and freed if hclgeptpgetcycle returns an error During the initialization of ptp, hclgeptpgetcycle might return an error and returned directly without unregister clock and free it. To avoid that, call hclgeptpdestroyclock to unregist and free clock if hclgeptpgetcycle failed.