net: fix sock_timestamping_bind_phc() to release device
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 11 Jan 2022 15:10:53 +0000 (16:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:05:39 +0000 (11:05 +0100)
commit62009fa50c1a70a291f8f72a66b08449a03ea50e
treef712f491377d45391dcd51e1e45dd9e46756632e
parent55d613f5d4c26ac8e5c5addc4d2dd4e876016750
net: fix sock_timestamping_bind_phc() to release device

commit 2a4d75bfe41232608f5596a6d1369f92ccb20817 upstream.

Don't forget to release the device in sock_timestamping_bind_phc() after
it was used to get the vclock indices.

Fixes: d463126e23f1 ("net: sock: extend SO_TIMESTAMPING for PHC binding")
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Cc: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/sock.c