Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1673086 > unrolled thread

Re: [PATCH] NFC: trf7970a: fix check of clock frequencies, use && instead of ||

Started bySamuel Ortiz <sameo@linux.intel.com>
First post2017-06-23 00:10 +0200
Last post2017-06-23 00:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] NFC: trf7970a: fix check of clock frequencies, use &&  instead of || Samuel Ortiz <sameo@linux.intel.com> - 2017-06-23 00:10 +0200

#1673086 — Re: [PATCH] NFC: trf7970a: fix check of clock frequencies, use && instead of ||

FromSamuel Ortiz <sameo@linux.intel.com>
Date2017-06-23 00:10 +0200
SubjectRe: [PATCH] NFC: trf7970a: fix check of clock frequencies, use && instead of ||
Message-ID<tVisy-27Z-15@gated-at.bofh.it>
Hi Colin,

On Mon, Apr 24, 2017 at 02:36:02PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> 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 <colin.king@canonical.com>
> ---
>  drivers/nfc/trf7970a.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
Applied to nfc-next, thanks.

Cheers,
Samuel.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web