From patchwork Thu Jan 13 18:13:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 476421 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0DIEIY1012122 for ; Thu, 13 Jan 2011 18:15:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756871Ab1AMSPT (ORCPT ); Thu, 13 Jan 2011 13:15:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46052 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756675Ab1AMSPS (ORCPT ); Thu, 13 Jan 2011 13:15:18 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0DIFGBD031451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 13 Jan 2011 13:15:17 -0500 Received: from pedra (vpn-234-99.phx2.redhat.com [10.3.234.99]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p0DIECc1016438; Thu, 13 Jan 2011 13:15:15 -0500 Date: Thu, 13 Jan 2011 16:13:34 -0200 From: Mauro Carvalho Chehab To: mkrufky@kernellabs.com Cc: Linux Media Mailing List Subject: [PATCH 3/3] [media] tda8290: Fix a bug if no tuner is detected Message-ID: <20110113161334.1a089a9c@pedra> In-Reply-To: <7c3d11fc6242f190067a9c64cb2b3ba670e51739.1294942291.git.mchehab@redhat.com> References: <7c3d11fc6242f190067a9c64cb2b3ba670e51739.1294942291.git.mchehab@redhat.com> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 13 Jan 2011 18:15:20 +0000 (UTC) diff --git a/drivers/media/common/tuners/tda8290.c b/drivers/media/common/tuners/tda8290.c index 5f889c1..11ea4e0 100644 --- a/drivers/media/common/tuners/tda8290.c +++ b/drivers/media/common/tuners/tda8290.c @@ -755,8 +755,11 @@ struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe, } if ((!(cfg) || (TDA829X_PROBE_TUNER == cfg->probe_tuner)) && - (tda829x_find_tuner(fe) < 0)) + (tda829x_find_tuner(fe) < 0)) { + memset(&fe->ops.analog_ops, 0, sizeof(struct analog_demod_ops)); + goto fail; + } switch (priv->ver) { case TDA8290: