Add the missing unlock before return from function idtcm_probe()
in the error handling case.
Fixes:
3a6ba7dc7799 ("ptp: Add a ptp clock driver for IDT ClockMatrix.")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Vincent Cheng <vincent.cheng.xh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
err = set_tod_write_overhead(idtcm);
- if (err)
+ if (err) {
+ mutex_unlock(&idtcm->reg_lock);
return err;
+ }
err = idtcm_load_firmware(idtcm, &client->dev);