Merge tag 'dm-4.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
[cascardo/linux.git] / drivers / ptp / ptp_clock.c
index 2e481b9..86280b7 100644 (file)
@@ -263,6 +263,7 @@ no_sysfs:
 no_device:
        mutex_destroy(&ptp->tsevq_mux);
        mutex_destroy(&ptp->pincfg_mux);
+       ida_simple_remove(&ptp_clocks_map, index);
 no_slot:
        kfree(ptp);
 no_memory: