--- a/net/core/sock.c +++ b/net/core/sock.c @@ -830,6 +830,8 @@ static int sock_timestamping_bind_phc(st } num = ethtool_get_phc_vclocks(dev, &vclock_index); + dev_put(dev); + for (i = 0; i < num; i++) { if (*(vclock_index + i) == phc_index) { match = true;