ACPI / SBS: Fix check in acpi_ac_get_present()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 27 Sep 2014 23:27:42 +0000 (01:27 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 27 Sep 2014 23:27:42 +0000 (01:27 +0200)
Parentheses are missing under an if () statement in
acpi_ac_get_present() which makes the check work differently
from what was intended (at least according to the comment right
above it).  Add the missing parens.

The problem was found by sparse.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: All applicable <stable@vger.kernel.org>
drivers/acpi/sbs.c

index 32aeceae10e3e21ae476739853b37320ec1932b0..a7a3edd28beb8d5f881ef891075e0f650e0482de 100644 (file)
@@ -441,7 +441,7 @@ static int acpi_ac_get_present(struct acpi_sbs *sbs)
         * The spec requires that bit 4 always be 1. If it's not set, assume
         * that the implementation doesn't support an SBS charger
         */
-       if (!(status >> 4) & 0x1)
+       if (!((status >> 4) & 0x1))
                return -ENODEV;
 
        sbs->charger_present = (status >> 15) & 0x1;
This page took 0.02533 seconds and 5 git commands to generate.