From patchwork Tue Mar 14 22:22:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 9624629 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 5956B604CC for ; Tue, 14 Mar 2017 22:23:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 420BD285CC for ; Tue, 14 Mar 2017 22:23:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34D73285CF; Tue, 14 Mar 2017 22:23:55 +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 C5F85285CC for ; Tue, 14 Mar 2017 22:23:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750884AbdCNWXy (ORCPT ); Tue, 14 Mar 2017 18:23:54 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:36526 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750835AbdCNWXx (ORCPT ); Tue, 14 Mar 2017 18:23:53 -0400 Received: by mail-wr0-f193.google.com with SMTP id l37so25513269wrc.3 for ; Tue, 14 Mar 2017 15:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=e2uFfWXoiMvbmRQ1LVGv3rsVxnX/+Rii1zH10LoVeWA=; b=S4MAFgS6a9dkgZGLTAFVlgEm84w6DM++Ukfx6p+FnPFzfXaHEhqXSwpMmzeg48HVmR 0qc+tbA8/u4upnxHQ+CQZTF/8HfR/BOHvIMXwno7TEYVEpCcja20Sirf2y+jTLPyG2PZ gcEnlwwneI63GI+cXb08CXeSo/yX7YFE2lZslqk0ec2Q0qJNfe2wVje9q2YOTO/amxlQ qobWOTeCQ+m74saxK8d256T3Y0jh+0Dwgqw6Qm09B6U7R4G6VM4JivDiTLrGJW5qCwKG S0Avesl0d+uuOVtr3dF2nGUwojhfv5dawZUM387mLupZfa94AB2lcWdO+oLayjeedKsW Np8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=e2uFfWXoiMvbmRQ1LVGv3rsVxnX/+Rii1zH10LoVeWA=; b=de4yASMTwO7zrHjFojmDx8luRjgojL3BboGceO801eJzWBLXZv4QohQaNbMOVqzq3C aBk7iF4p26j7PAATDHd6dqIDntMOmiJeBro2z6+zcYkDFoi841cB7AGa2c+OxW2+lKim ZW2m84rfcv7I9o15UwXGl52COcSkDQnGQI+BAf7cwKP2xFOTyvuUuB6WuEvQ7MSURHoB nrKSgAFc5o/5ToZEVc04P8iycfbiB8qBmfoYThSlMMHqVwUi/fScRsVnoSy+KQQNlY++ sjoZnsvSp/VZJDv4Vz9t+lUzYejatfYtmhgeeS9SDJDF3Z6oL1bhNHbdbDs/cknH7EsG vtCw== X-Gm-Message-State: AFeK/H2/kGj50flxV3+BSlSsgP1MHgWDHnCfpG9UN0gh6JjnBoigs37IbUMOaPJ52swavg== X-Received: by 10.223.155.211 with SMTP id e19mr8887wrc.74.1489530231535; Tue, 14 Mar 2017 15:23:51 -0700 (PDT) Received: from dvbdev.wuest.de (ip-37-24-178-151.hsi14.unitymediagroup.de. [37.24.178.151]) by smtp.gmail.com with ESMTPSA id i133sm17116830wmg.26.2017.03.14.15.23.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Mar 2017 15:23:50 -0700 (PDT) From: Daniel Scheller To: mchehab@kernel.org, linux-media@vger.kernel.org Subject: [PATCH] [media] dvb-frontends/drxk: don't log errors on unsupported operation mode Date: Tue, 14 Mar 2017 23:22:37 +0100 Message-Id: <20170314222237.10365-1-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.10.2 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 When fe_ops.read_status is called and no channel is tuned (yet), the subsequent calls to get_lock_status() causes the kernel log to be filled with drxk: Error -22 on get_lock_status which either means a NULL pointer was passed for the p_lock_status var, or neither QAM nor OFDM/DVBT operation mode are active. Instead of filling the kernel log in the latter case, print out a message to the debug level and return 0 (this isn't used in the calling drxk_get_stats() anyway). Signed-off-by: Daniel Scheller --- drivers/media/dvb-frontends/drxk_hard.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c index 7e1bbba..b5ea919 100644 --- a/drivers/media/dvb-frontends/drxk_hard.c +++ b/drivers/media/dvb-frontends/drxk_hard.c @@ -1904,7 +1904,9 @@ static int get_lock_status(struct drxk_state *state, u32 *p_lock_status) status = get_dvbt_lock_status(state, p_lock_status); break; default: - break; + pr_debug("Unsupported operation mode %d in %s\n", + state->m_operation_mode, __func__); + return 0; } error: if (status < 0)