Skip to contentSkip to conversation

renesas: missing unlock on error path

PATCH Applied Dan Carpenter 3 participants 3 messages Jun 24, 2015 – Jun 25, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 renesas: missing unlock on error path

We need to unlock before returning here.

Fixes a0d2f20650e8 ('Renesas Ethernet AVB PTP clock driver')
drivers/net/ethernet/renesas/ravb_ptp.c +3 -1
index 42656da..7a8ce92 100644
@@ -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);