ptp: free 'vclock_index' in ptp_clock_release()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 21 Oct 2021 09:13:53 +0000 (17:13 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Oct 2021 11:50:38 +0000 (12:50 +0100)
commitb6b19a71c8bbde2abaa99ba29e6c76ddc84984f8
treed509fd9b23293cc5aeeb5d75ea2acbf7b723569e
parentbf6abf345dfa77786aca554bc58c64bd428ecb1d
ptp: free 'vclock_index' in ptp_clock_release()

'vclock_index' is accessed from sysfs, it shouled be freed
in release function, so move it from ptp_clock_unregister()
to ptp_clock_release().

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_clock.c