From patchwork Sun Aug 20 10:29:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 9911071 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CF1CA601D4 for ; Sun, 20 Aug 2017 10:29:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEC9E28764 for ; Sun, 20 Aug 2017 10:29:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3A2928776; Sun, 20 Aug 2017 10:29:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DB9D28764 for ; Sun, 20 Aug 2017 10:29:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752655AbdHTK3W (ORCPT ); Sun, 20 Aug 2017 06:29:22 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:34198 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752619AbdHTK3U (ORCPT ); Sun, 20 Aug 2017 06:29:20 -0400 Received: by mail-wr0-f195.google.com with SMTP id p14so7602942wrg.1 for ; Sun, 20 Aug 2017 03:29:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NiNFzi9mO4YD9Lkyx382X3GTVgejvXwLvF3jAVmKJjA=; b=PTDFf1PMEmHtqPZM7C07Ge9AFaQYvIO0JFXGtVTViFS7vZ6AXlkj7lgyhdpOED+55M RBtJvlSxnAlvcNEJ6H3uADF0782nwYmAVPC53UqW2WBLWqtnULER9a57MKD2xqeDy5fA u7PH59bD3EDIecDAwhaSnhBbjcFESHRL8kuhB4Vd5wemkfSCvul//OJzXslx5lumUsjr tSp2/gM+hRA/aLxJlbOZBMuBnpCTO48PCeZnk3EzhzaznRkoDP1+VKFjE2Pie2BAFByV lryfsZr78dqWoF52i3uDLiZUavr55csOk4JepE6B+9QEwi5JHMYxWN1jFIcOlBgEc56k f0vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NiNFzi9mO4YD9Lkyx382X3GTVgejvXwLvF3jAVmKJjA=; b=e15tzSmfFLq+fjw5UxhCpsH8BXVwxsDEFLBiGc2mBlvA55oIEseEEMyLHyWEhYsiG7 qidGGgsLwm6sROaTUWl1xB/8FVJ6gYg22f8aLVDGkDbHazJ5OTSw/XJj/Or8CaC/pPdn AyCv8G8jO+ckgTIqX3snq82t+5MKgaWEamzDxP/gnO+2bRm/zFnqz/Pk1S5ChYBMPgpy r5kedjUdW8qipXemMD/+oLRyj5JQkTCCMrNsIbrVcOGrHqxupjxOOjvewEbLu4AGPdmL XFgANBm0GMc7M+L+8rK/3VjeTgzO30VeESSHr5Squ6wpCpyQYC3SMHSDzytMsF4MWXxq 9R4Q== X-Gm-Message-State: AHYfb5hkQ9rRK9fqaYuRB3hB3Iqck059BV8tuEvq/efet0yUoHjFUfFi Xt9pxPGkyN51e/pl X-Received: by 10.223.144.37 with SMTP id h34mr9727936wrh.93.1503224959258; Sun, 20 Aug 2017 03:29:19 -0700 (PDT) Received: from dvbdev.wuest.de (ip-84-118-193-88.unity-media.net. [84.118.193.88]) by smtp.gmail.com with ESMTPSA id 73sm6350341wmo.1.2017.08.20.03.29.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 20 Aug 2017 03:29:18 -0700 (PDT) From: Daniel Scheller To: linux-media@vger.kernel.org, mchehab@kernel.org, mchehab@s-opensource.com Cc: jasmin@anw.at, rjkm@metzlerbros.de Subject: [PATCH 1/2] [media] dvb-frontends/stv0910: fix FE_HAS_LOCK check order in tune() Date: Sun, 20 Aug 2017 12:29:14 +0200 Message-Id: <20170820102915.6196-2-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170820102915.6196-1-d.scheller.oss@gmail.com> References: <20170820102915.6196-1-d.scheller.oss@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Daniel Scheller Signed-off-by: Daniel Scheller --- drivers/media/dvb-frontends/stv0910.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c index a2648dd91a57..fe25b1778555 100644 --- a/drivers/media/dvb-frontends/stv0910.c +++ b/drivers/media/dvb-frontends/stv0910.c @@ -1581,13 +1581,15 @@ static int tune(struct dvb_frontend *fe, bool re_tune, return r; state->tune_time = jiffies; } - if (*status & FE_HAS_LOCK) - return 0; - *delay = HZ; r = read_status(fe, status); if (r) return r; + + if (*status & FE_HAS_LOCK) + return 0; + *delay = HZ; + return 0; }