From patchwork Sun Nov 7 13:57:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schwarzott X-Patchwork-Id: 4810 Return-path: Envelope-to: mchehab@pedra Delivery-date: Mon, 08 Nov 2010 10:25:36 -0200 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1PFQn1-0001Fv-SL for mchehab@pedra; Mon, 08 Nov 2010 10:25:36 -0200 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Mon, 08 Nov 2010 10:25:35 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PF5nC-0006ss-63; Sun, 07 Nov 2010 14:00:22 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752922Ab0KGOAR (ORCPT + 1 other); Sun, 7 Nov 2010 09:00:17 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:57022 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752902Ab0KGOAQ (ORCPT ); Sun, 7 Nov 2010 09:00:16 -0500 Received: from gauss.localnet (ppp-88-217-108-154.dynamic.mnet-online.de [88.217.108.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPSA id BC2EB1B4166; Sun, 7 Nov 2010 14:00:15 +0000 (UTC) From: Matthias Schwarzott To: Malcolm Priestley Subject: [PATCH] IX2505V: i2c transfer error code ignored Date: Sun, 7 Nov 2010 14:57:13 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.35-tuxonice-r7; KDE/4.5.3; x86_64; ; ) Cc: linux-media@vger.kernel.org MIME-Version: 1.0 Message-Id: <201011071457.14929.zzam@gentoo.org> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: 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 Acked-by: Malcolm Priestley Signed-off-by: Matthias Schwarzott 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)