Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp767449imm; Fri, 1 Jun 2018 09:10:40 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI/Upfsf8v8Dpz2GF2Sa4bLaCzLb4Gd5Nam/gORMgq01SPLEwWvYo+wcepjCiu5LyO1C36K X-Received: by 2002:a17:902:b483:: with SMTP id y3-v6mr11810945plr.66.1527869440781; Fri, 01 Jun 2018 09:10:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527869440; cv=none; d=google.com; s=arc-20160816; b=q/Jtn2bgwVoHXV3pS18ZlDy7Xn9EpN8bDmjDHOaJlfNFesSO8AvQbtYpuiZzO+1UJb 0ZvHZtNU0U2G+1v9XCmB1Z72uM/C+5Si706tC3PcuiVFIUbdHIB6hng+8skge1+4ooTp lItyLEHY7r6izmB7YUG9Hc8cTzSkVi+xKt/XlhYNBsnuq0DBoRIetlVSK8GluQBQ45OQ /6rdjRZj54mmY8tyRtkq7dJ1coiWUbfZoO1P1aYh31rDZkmsoemqKlhCgQR+9kGprnSj 8d1paiLLaT1WwaLck9VpIEUJTH+2ZrJTt186Jmy9TbXMw2zqDTuXcu6CmQ8oZ9IWcGgl MSBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=mWlZJEyWvYlweuliyLGrcdaIRuWmzePgcsWZD7qSGhA=; b=oMQKlEBhVGkv/nh6K0tNN6h2pY6UAhXxDw6RXIxTBD68WTWZNOwKnfIXblVyTJu/AN fKOenqjMgvNSk5gUYG5WA1lJOtiveF6BemBH1UcGHf/52SsTIlPP5j4nDuUv19ukdltW GyO+IVUllVoIvnEYUN/VQmlD5r4TuLIgqXGFTwjsQ3SVtrxc4fWIyOBLhnQjiJSwsu/r ewm9Zqsm1YB7UXFj8BrR40sogCyqqSo/BoUyisHSqxLQyejEke0IuVtzvqZIahlQJ5o0 yTkXbuPxBASpgVw/6+aSTdsfbuOFqzkzrLjIk+MIaPFo0m40mxdmSHIpmVqw189uPU9s S1jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Q/+dZNY9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5-v6si31636325pgo.0.2018.06.01.09.10.25; Fri, 01 Jun 2018 09:10:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Q/+dZNY9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752989AbeFAQKB (ORCPT + 99 others); Fri, 1 Jun 2018 12:10:01 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:35294 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752333AbeFAQJ6 (ORCPT ); Fri, 1 Jun 2018 12:09:58 -0400 Received: by mail-lf0-f65.google.com with SMTP id y72-v6so15590321lfd.2; Fri, 01 Jun 2018 09:09:57 -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=mWlZJEyWvYlweuliyLGrcdaIRuWmzePgcsWZD7qSGhA=; b=Q/+dZNY9GuOGc4Z4SB+bZpJ7KN1Go/fWPIXCjQX9toStgnOk/olhJEUfuPI2w7RRSs AkosUZrTWCyl8ZzXidZZzuSKsC8STgdqobG/5D7TOKNScQK4zEL+yrJuvWOduzC+qCgv vRp52/NfwO/ixLjg6lfB0HrvCGpH0MuWuBePsVwElkgzxSddzHvpl0E+tDB2nO0xzH7v 84imrZ7xFXgKeM2hQwjtedJVWt/2tRjtjkwIcWF8Ly5UsrexMvwM/IexNlmFyn8Fpklu QxAc5PExdS2W4+ZI7ORRyvLe5IYKm+N0hQuehcGHNJz5BoxeWaSg9swzmvQrhIQd9Akz a/fw== 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=mWlZJEyWvYlweuliyLGrcdaIRuWmzePgcsWZD7qSGhA=; b=i7vHZdza8p/mAXL5rSRlm6UsYDL7GLJ3MGhVVEiEi6yl47B452/CfR4tPwKAwSoWpL KSRznhr6mKmWa2RgQhCmkAbZoI14fHPli0ebBhWtcBIw8w5cx7QC8+Zdl58BKtmv+rxy 98cYKer5AesoC+KjLxOd2kVTaWIZP4B+s/DBJrIzSMA9vIOoNYJqv8cZbC1hZOukPz2R vc8Wq4sc8ToAkbr1S/GbZNn5rXP/4Q0SbGA3WGXBoXXWYvIvaQUa3/PBIMl1r4xCSqND WrwZzTGXp74o9k+j8xnjwLQ3YLQe6j7omvF63m1hqle1KO7E9iJu0QX0v65XB2L9uEaf /71g== X-Gm-Message-State: ALKqPwdOMg6lw3aNOFcHt6VcP/XfNSBlw5JDRHMCdkCw73uOZF42Pui/ HXnV2xs4dSyBrFP54dz0+o0= X-Received: by 2002:a19:c3d6:: with SMTP id t205-v6mr6863020lff.127.1527869397182; Fri, 01 Jun 2018 09:09:57 -0700 (PDT) Received: from localhost.localdomain ([188.162.65.204]) by smtp.gmail.com with ESMTPSA id a18-v6sm2379158ljf.17.2018.06.01.09.09.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jun 2018 09:09:56 -0700 (PDT) From: Ivan Bornyakov To: mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Bornyakov Subject: [PATCH] media: stv090x: fix if-else order Date: Fri, 1 Jun 2018 19:12:21 +0300 Message-Id: <20180601161221.24807-1-brnkv.i1@gmail.com> X-Mailer: git-send-email 2.16.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is this code: if (v >= 0x20) { ... } else if (v < 0x20) { ... } else if (v > 0x30) { /* this branch is impossible */ } It would be sensibly for last branch to be on the top. Signed-off-by: Ivan Bornyakov --- drivers/media/dvb-frontends/stv090x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/dvb-frontends/stv090x.c b/drivers/media/dvb-frontends/stv090x.c index 9133f65d4623..d70eb311ebaf 100644 --- a/drivers/media/dvb-frontends/stv090x.c +++ b/drivers/media/dvb-frontends/stv090x.c @@ -4841,7 +4841,11 @@ static int stv090x_setup(struct dvb_frontend *fe) } state->internal->dev_ver = stv090x_read_reg(state, STV090x_MID); - if (state->internal->dev_ver >= 0x20) { + if (state->internal->dev_ver > 0x30) { + /* we shouldn't bail out from here */ + dprintk(FE_ERROR, 1, "INFO: Cut: 0x%02x probably incomplete support!", + state->internal->dev_ver); + } else if (state->internal->dev_ver >= 0x20) { if (stv090x_write_reg(state, STV090x_TSGENERAL, 0x0c) < 0) goto err; @@ -4857,10 +4861,6 @@ static int stv090x_setup(struct dvb_frontend *fe) state->internal->dev_ver); goto err; - } else if (state->internal->dev_ver > 0x30) { - /* we shouldn't bail out from here */ - dprintk(FE_ERROR, 1, "INFO: Cut: 0x%02x probably incomplete support!", - state->internal->dev_ver); } /* ADC1 range */ -- 2.16.4