From patchwork Sun Aug 20 10:45:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 9911089 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 26CD6602A0 for ; Sun, 20 Aug 2017 10:45:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17766285FD for ; Sun, 20 Aug 2017 10:45:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BB4928721; Sun, 20 Aug 2017 10:45:53 +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 A34D7285FD for ; Sun, 20 Aug 2017 10:45:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752749AbdHTKpv (ORCPT ); Sun, 20 Aug 2017 06:45:51 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:34311 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751634AbdHTKps (ORCPT ); Sun, 20 Aug 2017 06:45:48 -0400 Received: by mail-wr0-f196.google.com with SMTP id p14so7646074wrg.1 for ; Sun, 20 Aug 2017 03:45:48 -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; bh=HCAT1j9lARi6mvMzLx3Et9Iek7PUPZHJmC5GXEfAX2c=; b=IF6a8RFuIpA6tXr22e+63Uj6HmS1y2lnzTQGG0YaDRLetf1lsDjGjSQcgCGgy3iGjl WB9sbZ8oB+6vTVwClH2b5tkpeN7gYtdqX7vIJoqP6tHu/6gRTZQdNPJZAecY255n0jJG 5snvd061LKJpJPOdaNL7VzOmqkapgrBftk+dk800HHuVVBucZdATcdoX79UpKdlZU3hU iTkRsTKOZ4ttexV4o4S4a2WuGcYuzyeQ1HTGwrSZs8GHEaRRcuof9MZB7rH0iDCYMKBo YTBKo693wrjQ/Pxys8Xeebw0W0SPrno60OW7F25rgOcq7IOmvmI9jBb9cikRU+dQppY6 xWvA== 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; bh=HCAT1j9lARi6mvMzLx3Et9Iek7PUPZHJmC5GXEfAX2c=; b=rYuM0Zelvl7G/nzB992lEUBshQQ1v+7ozTKHSozLF0N2PyDabS7gq1rYjdkIRRGZ3N KmS94MHohPvEqUc1+Mn/ETxmDo7lPHEKAHlp8RbXCpb6vx504mA+WJtjzmqRZsOLljt9 0Mch2iMfsqycY5CdtpUn7gprCZQ1l7+1ZcWKptYMaSmBi+vWUFE+5L/sBr4WJ3V6uShC TjXkvWTfYFTf4NOGfg79eYIwWG9Ws4gVR4s0PQ3dI8SR8CDakTIXNpJruaVXtqPajGpy EW7d4c62oA5C5/TPFnZVJKpAbZiIJ3VI86p0OPitmp1EJpj1KI0yrloDM4q6f47gg8+k geNA== X-Gm-Message-State: AHYfb5htLC65VzYXT0qj/J8c7cLet+mliMOLoVMYw/sRsJBoe4Nymg92 /FVjoP5b9NFn3rsd X-Received: by 10.28.105.147 with SMTP id z19mr1526981wmh.175.1503225947184; Sun, 20 Aug 2017 03:45:47 -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 b33sm10980680wrg.65.2017.08.20.03.45.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 20 Aug 2017 03:45:46 -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] [media] dvb-frontends/mxl5xx: fix lock check order Date: Sun, 20 Aug 2017 12:45:45 +0200 Message-Id: <20170820104545.6596-1-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.13.0 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 --- When the mxl5xx driver together with the ddbridge glue gets merged ([1]), this one should go in aswell - this fix is part of the dddvb-0.9.31 release. drivers/media/dvb-frontends/mxl5xx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/mxl5xx.c b/drivers/media/dvb-frontends/mxl5xx.c index 676c96c216c3..d9136d67f5d4 100644 --- a/drivers/media/dvb-frontends/mxl5xx.c +++ b/drivers/media/dvb-frontends/mxl5xx.c @@ -638,13 +638,14 @@ static int tune(struct dvb_frontend *fe, bool re_tune, state->tune_time = jiffies; return 0; } - if (*status & FE_HAS_LOCK) - return 0; r = read_status(fe, status); if (r) return r; + if (*status & FE_HAS_LOCK) + return 0; + return 0; }