From patchwork Thu Jul 9 04:06:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antti Palosaari X-Patchwork-Id: 6753051 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6639D9F40A for ; Thu, 9 Jul 2015 04:07:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A48B620689 for ; Thu, 9 Jul 2015 04:07:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB85620675 for ; Thu, 9 Jul 2015 04:07:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751505AbbGIEHQ (ORCPT ); Thu, 9 Jul 2015 00:07:16 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:49754 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751298AbbGIEG4 (ORCPT ); Thu, 9 Jul 2015 00:06:56 -0400 Received: from 85-23-164-218.bb.dnainternet.fi ([85.23.164.218] helo=localhost.localdomain.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ZD36t-0002AB-3V; Thu, 09 Jul 2015 07:06:55 +0300 From: Antti Palosaari To: linux-media@vger.kernel.org Cc: Antti Palosaari Subject: [PATCH 11/12] tda10071: do not get_frontend() when not ready Date: Thu, 9 Jul 2015 07:06:31 +0300 Message-Id: <1436414792-9716-11-git-send-email-crope@iki.fi> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1436414792-9716-1-git-send-email-crope@iki.fi> References: <1436414792-9716-1-git-send-email-crope@iki.fi> X-SA-Exim-Connect-IP: 85.23.164.218 X-SA-Exim-Mail-From: crope@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is a bit hack, but returning error when driver is not tuned yet causes DVBv5 zap stop polling DVBv5 statistics. Thus return 0 even callback is called during invalid device state. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/tda10071.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c index c8feb58..c661b74 100644 --- a/drivers/media/dvb-frontends/tda10071.c +++ b/drivers/media/dvb-frontends/tda10071.c @@ -720,7 +720,7 @@ static int tda10071_get_frontend(struct dvb_frontend *fe) u8 buf[5], tmp; if (!dev->warm || !(dev->fe_status & FE_HAS_LOCK)) { - ret = -EFAULT; + ret = 0; goto error; }