From patchwork Sat Jan 15 18:04:16 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: 481301 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 p0FG6W6O022827 for ; Sat, 15 Jan 2011 16:06:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753011Ab1AOQGa (ORCPT ); Sat, 15 Jan 2011 11:06:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41939 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173Ab1AOQG2 (ORCPT ); Sat, 15 Jan 2011 11:06:28 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0FG6SVL022203 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 15 Jan 2011 11:06:28 -0500 Received: from pedra (vpn-234-251.phx2.redhat.com [10.3.234.251]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p0FG5PXt001803 for ; Sat, 15 Jan 2011 11:06:27 -0500 Date: Sat, 15 Jan 2011 16:04:16 -0200 From: Mauro Carvalho Chehab Cc: Linux Media Mailing List Subject: [PATCH 2/8] [media] tda8290: Fix a bug if no tuner is detected Message-ID: <20110115160416.2f48be14@pedra> In-Reply-To: References: Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 To: unlisted-recipients:; (no To-header on input) 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]); Sat, 15 Jan 2011 16:06:32 +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: