mirror of https://gitee.com/openkylin/linux.git
renesas: missing unlock on error path
We need to unlock before returning here.
Fixes: a0d2f20650
('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>
This commit is contained in:
parent
be35ffa38e
commit
5102e23791
|
@ -116,8 +116,10 @@ static int ravb_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
|
||||||
priv->ptp.current_addend = addend;
|
priv->ptp.current_addend = addend;
|
||||||
|
|
||||||
gccr = ravb_read(ndev, GCCR);
|
gccr = ravb_read(ndev, GCCR);
|
||||||
if (gccr & GCCR_LTI)
|
if (gccr & GCCR_LTI) {
|
||||||
|
spin_unlock_irqrestore(&priv->lock, flags);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
}
|
||||||
ravb_write(ndev, addend & GTI_TIV, GTI);
|
ravb_write(ndev, addend & GTI_TIV, GTI);
|
||||||
ravb_write(ndev, gccr | GCCR_LTI, GCCR);
|
ravb_write(ndev, gccr | GCCR_LTI, GCCR);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue