mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
ACPI / watchdog: Fix off-by-one error at resource assignment
The resource allocation in WDAT watchdog has off-one-by error, it sets
one byte more than the actual end address. This may eventually lead
to unexpected resource conflicts.
Fixes: 058dfc7670 (ACPI / watchdog: Add support for WDAT hardware watchdog)
Cc: 4.9+ <[email protected]> # 4.9+
Signed-off-by: Takashi Iwai <[email protected]>
Acked-by: Mika Westerberg <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
c698ca5278
commit
b1abf6fc49
2 changed files with 3 additions and 3 deletions
|
|
@ -392,7 +392,7 @@ static int wdat_wdt_probe(struct platform_device *pdev)
|
|||
|
||||
memset(&r, 0, sizeof(r));
|
||||
r.start = gas->address;
|
||||
r.end = r.start + gas->access_width;
|
||||
r.end = r.start + gas->access_width - 1;
|
||||
if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
|
||||
r.flags = IORESOURCE_MEM;
|
||||
} else if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue