[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <11648.1408555890@turing-police.cc.vt.edu>
Date: Wed, 20 Aug 2014 13:31:30 -0400
From: Valdis.Kletnieks@...edu
To: Ari Sundholm <asundhol@...hut.fi>
Cc: platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
Matthew Garrett <matthew.garrett@...ula.com>
Subject: Re: [PATCH] Revert "platform/x86/toshiba-apci.c possible bad if test?"
On Wed, 20 Aug 2014 20:03:26 +0300, Ari Sundholm said:
> From: Ari Sundholm <ari@...era.com>
>
> This reverts commit bdc3ae7221213963f438faeaa69c8b4a2195f491.
> + if (sscanf(buf, "%i", &mode) != 1 && (mode != 2 || mode != 1))
> return -EINVAL;
I'm not convinced that's right either. If we come in and mode == 1, then
the mode != 2 is true, and yoinks...
I think this wanted to be sscanf() != 1 || ! (mode == 2 || mode == 1)
I'll spin a patch against the reverted version if desired.
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists