ptp: ptp_clockmatrix: Fix missing unlock on error in idtcm_probe()

Add the missing unlock before return from function idtcm_probe()
in the error handling case.

Fixes: 3a6ba7dc77 ("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>
This commit is contained in:
Wei Yongjun 2019-11-06 14:33:09 +00:00 committed by David S. Miller
parent d0d605c5e1
commit b97fa0b544

View File

@ -1294,8 +1294,10 @@ static int idtcm_probe(struct i2c_client *client,
err = set_tod_write_overhead(idtcm);
if (err)
if (err) {
mutex_unlock(&idtcm->reg_lock);
return err;
}
err = idtcm_load_firmware(idtcm, &client->dev);