Skip to content

Commit

Permalink
renesas: missing unlock on error path
Browse files Browse the repository at this point in the history
We need to unlock before returning here.

Fixes: a0d2f20 ('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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Jun 25, 2015
1 parent be35ffa commit 5102e23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/renesas/ravb_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5102e23

Please sign in to comment.