diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-06-24 17:32:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-25 02:13:02 -0700 |
commit | 5102e237912adf5c826cc7421fe25da66d293e94 (patch) | |
tree | 398cef76c42f42581a12ea34c0e5669579ec7cef | |
parent | be35ffa38e48da6402f08e10988dc9969ca92962 (diff) | |
download | linux-stable-5102e237912adf5c826cc7421fe25da66d293e94.tar.gz linux-stable-5102e237912adf5c826cc7421fe25da66d293e94.tar.bz2 linux-stable-5102e237912adf5c826cc7421fe25da66d293e94.zip |
renesas: missing unlock on error path
We need to unlock before returning here.
Fixes: a0d2f20650e8 ('Renesas Ethernet AVB PTP clock driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/renesas/ravb_ptp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/renesas/ravb_ptp.c b/drivers/net/ethernet/renesas/ravb_ptp.c index 42656da50500..7a8ce920c49e 100644 --- a/drivers/net/ethernet/renesas/ravb_ptp.c +++ b/drivers/net/ethernet/renesas/ravb_ptp.c @@ -116,8 +116,10 @@ static int ravb_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) priv->ptp.current_addend = addend; gccr = ravb_read(ndev, GCCR); - if (gccr & GCCR_LTI) + if (gccr & GCCR_LTI) { + spin_unlock_irqrestore(&priv->lock, flags); return -EBUSY; + } ravb_write(ndev, addend & GTI_TIV, GTI); ravb_write(ndev, gccr | GCCR_LTI, GCCR); |