Commit b97fa0b5 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

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: 3a6ba7dc ("ptp: Add a ptp clock driver for IDT ClockMatrix.")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: default avatarVincent Cheng <vincent.cheng.xh@renesas.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d0d605c5
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment