]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
pnpacpi: fix incorrect TEST_ALPHA() test
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 7 Dec 2012 22:11:14 +0000 (23:11 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 3 Jan 2013 03:33:30 +0000 (03:33 +0000)
commit cdc87c5a30f407ed1ce43d8a22261116873d5ef1 upstream.

TEST_ALPHA() is broken and always returns 0.

[akpm@linux-foundation.org: return false for '@' as well, per Bjorn]
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/pnp/pnpacpi/core.c

index e3537888db7e3717cff164bd9d7b3364610a3ac3..291906e8e9a9782ba045d4af2e9391c58d3c370c 100644 (file)
@@ -58,7 +58,7 @@ static inline int __init is_exclusive_device(struct acpi_device *dev)
        if (!(('0' <= (c) && (c) <= '9') || ('A' <= (c) && (c) <= 'F'))) \
                return 0
 #define TEST_ALPHA(c) \
-       if (!('@' <= (c) || (c) <= 'Z')) \
+       if (!('A' <= (c) && (c) <= 'Z')) \
                return 0
 static int __init ispnpidacpi(const char *id)
 {