Re: [PATCH] Revert "platform/x86/toshiba-apci.c possible bad if test?"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 20 Aug 2014 20:03:26 +0300, Ari Sundholm said:
> From: Ari Sundholm <ari@xxxxxxxxxx>
>
> 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.

Attachment: pgp9NwIlTuoZ7.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux