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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);