Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753585AbdFVWB1 (ORCPT ); Thu, 22 Jun 2017 18:01:27 -0400 Received: from mga04.intel.com ([192.55.52.120]:52376 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751221AbdFVWB0 (ORCPT ); Thu, 22 Jun 2017 18:01:26 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,374,1493708400"; d="scan'208";a="1143942116" Date: Fri, 23 Jun 2017 00:01:21 +0200 From: Samuel Ortiz To: Colin King Cc: Geoff Lansberry , linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] NFC: trf7970a: fix check of clock frequencies, use && instead of || Message-ID: <20170622220121.GB21214@zurbaran.ger.intel.com> References: <20170424133603.3697-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170424133603.3697-1-colin.king@canonical.com> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 740 Lines: 21 Hi Colin, On Mon, Apr 24, 2017 at 02:36:02PM +0100, Colin King wrote: > From: Colin Ian King > > The "or" condition (clk_freq != TRF7970A_27MHZ_CLOCK_FREQUENCY) || > (clk_freq != TRF7970A_13MHZ_CLOCK_FREQUE) will always be true because > clk_freq cannot be equal to two different values at the same time. Use > the && operator instead of || to fix this. > > Detected by CoverityScan, CID#1430468 ("Constant expression result") > > Fixes: 837eb4d21ecde7 ("NFC: trf7970a: add device tree option for 27MHz clock") > Signed-off-by: Colin Ian King > --- > drivers/nfc/trf7970a.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied to nfc-next, thanks. Cheers, Samuel.