IX2505V: i2c transfer error code ignored

Message ID 201011071457.14929.zzam@gentoo.org (mailing list archive)
State Superseded, archived
Headers

Commit Message

Matthias Schwarzott Nov. 7, 2010, 1:57 p.m. UTC
  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
  

Comments

Malcolm Priestley Nov. 7, 2010, 6:50 p.m. UTC | #1
On Sun, 2010-11-07 at 14:57 +0100, Matthias Schwarzott wrote:
> 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.

Acked-by: Malcolm Priestley <tvboxspy@gmail.com>

Regards


Malcolm




--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Matthias Schwarzott Nov. 10, 2010, 7:42 p.m. UTC | #2
On Sunday 07 November 2010, Malcolm Priestley wrote:
> On Sun, 2010-11-07 at 14:57 +0100, Matthias Schwarzott wrote:
> > 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.
> 
> Acked-by: Malcolm Priestley <tvboxspy@gmail.com>
> 

I forgot the SOB, so here it is:
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>

Regards
Matthias
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff --git a/drivers/media/dvb/frontends/ix2505v.c b/drivers/media/dvb/frontends/ix2505v.c
index 55f2eba..6360c68 100644
--- a/drivers/media/dvb/frontends/ix2505v.c
+++ b/drivers/media/dvb/frontends/ix2505v.c
@@ -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)