diff options
| author | Dan Carpenter <dan.carpenter@linaro.org> | 2025-10-31 16:03:43 +0300 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-11-03 17:29:52 +0100 |
| commit | 01e11d18da818eabdb3769081e7123ed8bfe863c (patch) | |
| tree | 0a2c76f16d383e3c34dc4a9e33f558e03ec5bebf /net/unix/af_unix.c | |
| parent | 6146a0f1dfae5d37442a9ddcba012add260bceb0 (diff) | |
ACPI: SBS: Fix present test in acpi_battery_read()
The battery->present variable is a 1 bit bitfield in a u8. This means
that the "state & (1 << battery->id)" test will only work when
"battery->id" is zero, otherwise ->present is zero. Fix this by adding
a !!.
Fixes: db1c291af7ad ("ACPI: SBS: Make SBS reads table-driven.")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aQSzr4NynN2mpEvG@stanley.mountain
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
