diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2019-11-06 14:33:09 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-06 21:19:59 -0800 |
commit | b97fa0b54447107e572ac7ba6ad0f0fd64170104 (patch) | |
tree | b7d570412f8d0f54e6aed08b3618885b17d5046f /drivers/ptp/ptp_clockmatrix.c | |
parent | d0d605c5e10af0714b7b7ed5e4d3918b308c28c0 (diff) | |
download | linux-b97fa0b54447107e572ac7ba6ad0f0fd64170104.tar.gz linux-b97fa0b54447107e572ac7ba6ad0f0fd64170104.tar.bz2 linux-b97fa0b54447107e572ac7ba6ad0f0fd64170104.zip |
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: 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>
Diffstat (limited to 'drivers/ptp/ptp_clockmatrix.c')
-rw-r--r-- | drivers/ptp/ptp_clockmatrix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c index cf5889b7d825..a5110b7b4ece 100644 --- a/drivers/ptp/ptp_clockmatrix.c +++ b/drivers/ptp/ptp_clockmatrix.c @@ -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); |