Skip to contentSkip to conversation

af9013: add check on af9013_wr_regs() return value

PATCH New Gustavo A. R. Silva 1 participant 1 message Jun 15, 2017

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

PATCH 1/1 af9013: add check on af9013_wr_regs() return value

Check return value from call to af9013_wr_regs(), so in case of error print debug message and return.

Addresses-Coverity-ID: 1227035

---
 drivers/media/dvb-frontends/af9013.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/dvb-frontends/af9013.c +2 -0
index 51f942f..dc7ccda 100644
@@ -608,6 +608,8 @@ static int af9013_set_frontend(struct dvb_frontend *fe)
 
 		ret = af9013_wr_regs(state, 0xae00, coeff_lut[i].val,
 			sizeof(coeff_lut[i].val));
+		if (ret)
+			goto err;
 	}
 
 	/* program frequency control */
Signature · 1 line
2.5.0