mirror of
https://github.com/torvalds/linux.git
synced 2024-09-20 23:13:00 +00:00
char: hpet: fix a missing check of ioremap
Check if ioremap fails, and if so, return AE_ERROR. Signed-off-by: Kangjie Lu <kjlu@umn.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d8fb3fafa2
commit
13bd14a41c
|
@ -973,6 +973,8 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
|
||||||
if (ACPI_SUCCESS(status)) {
|
if (ACPI_SUCCESS(status)) {
|
||||||
hdp->hd_phys_address = addr.address.minimum;
|
hdp->hd_phys_address = addr.address.minimum;
|
||||||
hdp->hd_address = ioremap(addr.address.minimum, addr.address.address_length);
|
hdp->hd_address = ioremap(addr.address.minimum, addr.address.address_length);
|
||||||
|
if (!hdp->hd_address)
|
||||||
|
return AE_ERROR;
|
||||||
|
|
||||||
if (hpet_is_known(hdp)) {
|
if (hpet_is_known(hdp)) {
|
||||||
iounmap(hdp->hd_address);
|
iounmap(hdp->hd_address);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user