Skip to contentSkip to conversation

IX2505V: i2c transfer error code ignored

PATCH In review Matthias Schwarzott 2 participants 3 messages Nov 7, 2010 – Nov 10, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IX2505V: i2c transfer error code ignored

Hello Malcolm!

It seems that ix2505v driver ignores a i2c error in ix2505v_read_status_reg. This looks like a typing error using (ret = 1) instead of correct (ret == 1).

The attached patch fixes this.

Regards
Matthias

drivers/media/dvb/frontends/ix2505v.c +1 -1
index 55f2eba..6360c68 100644
@@ -72,7 +72,7 @@ static int ix2505v_read_status_reg(struct ix2505v_state *state)
 	ret = i2c_transfer(state->i2c, msg, 1);
 	deb_i2c("Read %s ", __func__);
 
-	return (ret = 1) ? (int) b2[0] : -1;
+	return (ret == 1) ? (int) b2[0] : -1;
 }
 
 static int ix2505v_write(struct ix2505v_state *state, u8 buf[], u8 count)
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Matthias Schwarzott

Hello Malcolm!

It seems that ix2505v driver ignores a i2c error in ix2505v_read_status_reg. This looks like a typing error using (ret = 1) instead of correct (ret == 1).

The attached patch fixes this.

Hi Matthias,

Thanks for picking that up.

Regards

Malcolm

#2 lore raw
Quoted 7 lines · Malcolm Priestley
Quoted 6 lines · Matthias Schwarzott

Hello Malcolm!

It seems that ix2505v driver ignores a i2c error in ix2505v_read_status_reg. This looks like a typing error using (ret = 1) instead of correct (ret == 1).

Quoted 8 lines
Quoted 1 line

The attached patch fixes this.

Hi Matthias,

Thanks for picking that up.

I forgot the SOB, so here it is:

Regards
Matthias